Skip to content

Js Cdp support - #8440

Merged
AutomatedTester merged 19 commits into
SeleniumHQ:trunkfrom
raju249:js-cdp
Jul 16, 2020
Merged

Js Cdp support#8440
AutomatedTester merged 19 commits into
SeleniumHQ:trunkfrom
raju249:js-cdp

Conversation

@raju249

@raju249 raju249 commented Jun 19, 2020

Copy link
Copy Markdown
Member

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.

@shs96c shs96c left a comment

Copy link
Copy Markdown
Member

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.

Comment thread javascript/webdriver/BUILD.bazel Outdated
outs=["devtools/types"],
cmd = "node $(location protocol-dts-generator.js) $@",
tools=[
"/javascript/webdriver/devtools/generator/protocol-dts-generator.js",

Copy link
Copy Markdown
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

AutomatedTester commented Jun 22, 2020 via email

Copy link
Copy Markdown
Member

@raju249

raju249 commented Jun 22, 2020

Copy link
Copy Markdown
Member Author

@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. 🤔

@raju249
raju249 force-pushed the js-cdp branch 2 times, most recently from a5d9382 to f4ebb82 Compare June 29, 2020 07:11
@raju249
raju249 changed the base branch from master to trunk July 2, 2020 06:30
@raju249
raju249 marked this pull request as ready for review July 15, 2020 10:25
Comment thread javascript/node/selenium-webdriver/BUILD.bazel
@AutomatedTester

Copy link
Copy Markdown
Member

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

)

genrule(
name="create-cdp-srcs",

Copy link
Copy Markdown
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
Copy Markdown
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.

3 participants