Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Js Cdp support #8440

Merged
merged 19 commits into from
Jul 16, 2020
Merged

Js Cdp support #8440

merged 19 commits into from
Jul 16, 2020

Conversation

raju249
Copy link
Member

@raju249 raju249 commented Jun 19, 2020

Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.

Description

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Member

@shs96c shs96c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the .d.js files? Outputs from running something in place?

I'd strongly recommend not checking in new copies of browser_protocol.json and js_protocol.json. They're already in the tree, and multiple copies make updating and keeping things in sync a lot harder. If we need to move them to a better location, we can do that.

outs=["devtools/types"],
cmd = "node $(location protocol-dts-generator.js) $@",
tools=[
"/javascript/webdriver/devtools/generator/protocol-dts-generator.js",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actual tool is node here. The script should be included in the srcs. I suspect you also want the browser_protocol.json and js_protocol.json in the sources too. The trick is to imagine that only the things listed as inputs to the rule are actually available.

Since the protocol-dts-generator.js file is local to this build file, you may need to prefix it with a :, to indicate that it's a target.

@AutomatedTester
Copy link
Member

AutomatedTester commented Jun 22, 2020 via email

@raju249
Copy link
Member Author

raju249 commented Jun 22, 2020

@shs96c

What are the .d.js files? Outputs from running something in place?

Yes, when we run the protocol-dts-generator.js which is compiled from devtools-protocol project we get those files, although I can rename to just <name>.js and drop the d. 🤔

@AutomatedTester
Copy link
Member

This is failing on Travis CI because it can't find ws. Can you check.

)

genrule(
name="create-cdp-srcs",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this rule needs to be called by selenium-webdriver and the jasmine_node_test rule

@@ -88,3 +89,41 @@ genrule(
],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on line 71 or so you need to add "@npm//ws",

@AutomatedTester AutomatedTester merged commit a5536df into SeleniumHQ:trunk Jul 16, 2020
@raju249 raju249 deleted the js-cdp branch July 16, 2020 13:09
titusfortner pushed a commit to titusfortner/selenium that referenced this pull request Aug 13, 2020
This adds support CDP support to the JS client and allows people to connect use CDP tooling, like how puppeteer does things, for better automation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants