-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Chinese version translated/翻译了中文版本 #1057
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
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
37 changes: 13 additions & 24 deletions
37
...content/documentation/webdriver/bidirectional/bidi_api_remotewebdriver.zh-cn.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,65 +1,54 @@ | ||
| --- | ||
| title: "RemoteWebDriver BiDirectional API" | ||
| linkTitle: "RemoteWebDriver BiDi API" | ||
| title: "远程 WebDriver 双向 API(RemoteWebDriver BiDirectional API)" | ||
| linkTitle: "远程 WebDriver 双向 API" | ||
| weight: 1 | ||
| --- | ||
|
|
||
| {{% pageinfo color="warning" %}} | ||
| <p class="lead"> | ||
| <i class="fas fa-language display-4"></i> | ||
| Page being translated from | ||
| English to Chinese. Do you speak Chinese? Help us to translate | ||
| it by sending us pull requests! | ||
| </p> | ||
| {{% /pageinfo %}} | ||
|
|
||
| The following examples demonstrate how to leverage BiDi APIs with [Remote WebDriver](/documentation/webdriver/remote_webdriver/). | ||
|
|
||
| ## Register Basic Auth | ||
| 下面的例子显示如何使用 [Remote WebDriver](/documentation/webdriver/remote_webdriver/). | ||
|
|
||
| Some applications make use of browser authentication to secure pages. | ||
| With Selenium, you can automate the input of basic auth credentials whenever they arise. | ||
| ## 注册基本认证(Register Basic Auth) | ||
|
|
||
| 一些应用程序使用浏览器身份验证来保护页面。使用 Selenium,您可以在基本身份验证出现时自动输入它们。 | ||
|
|
||
| {{< tabpane disableCodeBlock=true >}} | ||
| {{< tab header="Java" >}} | ||
| {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L79-94" >}} | ||
| {{< /tab >}} | ||
| {{< /tabpane >}} | ||
|
|
||
| ## Mutation Observation | ||
| ## DOM动态变化观察 (Mutation Observation) | ||
|
|
||
| Mutation Observation is the ability to capture events via | ||
| WebDriver BiDi when there are DOM mutations on a specific | ||
| element in the DOM. | ||
| DOM动态变化观察是当 DOM 中的特定元素上存在 DOM 突变时,通过 WebDriver BiDi 捕获事件的能力。 | ||
|
|
||
| {{< tabpane disableCodeBlock=true >}} | ||
| {{< tab header="Java" >}} | ||
| {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L111-133" >}} | ||
| {{< /tab >}} | ||
| {{< /tabpane >}} | ||
|
|
||
| ## Listen to `console.log` events | ||
| ## 监听控制台日志事件 (Listen to `console.log` events) | ||
|
|
||
| Listen to the `console.log` events and register callbacks to process the event. | ||
| 监听 console. log 事件并注册回调以处理该事件。 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a code , please keep format as previous mentioned |
||
|
|
||
| {{< tabpane disableCodeBlock=true >}} | ||
| {{< tab header="Java" >}} | ||
| {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L149-170" >}} | ||
| {{< /tab >}} | ||
| {{< /tabpane >}} | ||
|
|
||
| ## Actions causing JS exceptions | ||
| ## JS异常处理 (Actions causing JS exceptions) | ||
|
|
||
| {{< tabpane disableCodeBlock=true >}} | ||
| {{< tab header="Java" >}} | ||
| {{< gh-codeblock path="examples/java/src/test/java/dev/selenium/augmenter/CdpRemoteWebDriverTest.java#L179-185" >}} | ||
| {{< /tab >}} | ||
| {{< /tabpane >}} | ||
|
|
||
| ## Network Interception | ||
| ## 截网侦察 (Network Interception) | ||
|
|
||
| If you want to capture network events coming into the browser and you want manipulate them you are able to do | ||
| it with the following examples. | ||
| 如果你希望捕获进入浏览器的网络事件并对其进行操作,可以使用以下示例进行操作。 | ||
|
|
||
| {{< tabpane disableCodeBlock=true >}} | ||
| {{< tab header="Java" >}} | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Where is BiDi APIs ?