-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Js Cdp support #8440
Conversation
There was a problem hiding this 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.
javascript/webdriver/BUILD.bazel
Outdated
outs=["devtools/types"], | ||
cmd = "node $(location protocol-dts-generator.js) $@", | ||
tools=[ | ||
"/javascript/webdriver/devtools/generator/protocol-dts-generator.js", |
There was a problem hiding this comment.
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.
I have a follow up for the python code that will delete this duplicate so it’s fine for this PR
…On Jun 22, 2020, 12:22 PM +0100, Simon Stewart ***@***.***>, wrote:
@shs96c commented on this pull request.
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.
In javascript/webdriver/BUILD.bazel:
> @@ -66,3 +66,12 @@ closure_test_suite(
"//javascript/webdriver/atoms/inject:deps",
],
)
+
+genrule(
+ name="create-cdp-srcs",
+ outs=["devtools/types"],
+ cmd = "node $(location protocol-dts-generator.js) $@",
+ tools=[
+ "/javascript/webdriver/devtools/generator/protocol-dts-generator.js",
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.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Yes, when we run the |
a5d9382
to
f4ebb82
Compare
This is failing on Travis CI because it can't find |
) | ||
|
||
genrule( | ||
name="create-cdp-srcs", |
There was a problem hiding this comment.
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( | |||
], |
There was a problem hiding this comment.
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",
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.
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
Checklist