Skip to content

Commit

Permalink
Fix broken links in .chrome API docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
garg3133 committed Jul 22, 2024
1 parent 7784343 commit 45ad29e
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions docs/api/chrome/index.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@
## Using Chrome DevTools protocol
Both [ChromeDriver](https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/chrome_exports_Driver.html) and [EdgeDriver](https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/edge_exports_Driver.html) expose some specific commands for working with their respective browsers.

Both [ChromeDriver](https://www.selenium.dev/selenium/docs/api/javascript/module-selenium-webdriver_chrome.html) and [EdgeDriver](https://www.selenium.dev/selenium/docs/api/javascript/module-selenium-webdriver_edge.html) expose some specific commands for working with their respective browsers.

When using ChromeDriver or EdgeDriver it is now possible to execute commands via the [Chrome DevTools protocol](https://chromedevtools.github.io/devtools-protocol/).

Here's the full list of commands available on the `chrome` namespace on the `browser` object:

**browser.chrome:**
- [.launchApp()](https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/chrome_exports_Driver.html#launchApp)
- [.getNetworkConditions()](https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/chrome_exports_Driver.html#getNetworkConditions)
- [.setNetworkConditions()](https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/chrome_exports_Driver.html#setNetworkConditions)
- [.sendDevToolsCommand()](https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/chrome_exports_Driver.html#sendDevToolsCommand)
- [.sendAndGetDevToolsCommand()](https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/chrome_exports_Driver.html#sendAndGetDevToolsCommand)
- [.setPermission()](https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/chrome_exports_Driver.html#setPermission)
- [.setDownloadPath()](https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/chrome_exports_Driver.html#setDownloadPath)
- [.getCastSinks()](https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/chrome_exports_Driver.html#getCastSinks)
- [.setCastSinkToUse()](https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/chrome_exports_Driver.html#setCastSinkToUse)
- [.startCastTabMirroring()](https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/chrome_exports_Driver.html#startCastTabMirroring)
- [.getCastIssueMessage()](https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/chrome_exports_Driver.html#getCastIssueMessage)
- [.stopCasting()](https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/chrome_exports_Driver.html#stopCasting)

- [.launchApp()](https://www.selenium.dev/selenium/docs/api/javascript/module-selenium-webdriver_chromium-Driver.html#launchApp)
- [.getNetworkConditions()](https://www.selenium.dev/selenium/docs/api/javascript/module-selenium-webdriver_chromium-Driver.html#getNetworkConditions)
- [.setNetworkConditions()](https://www.selenium.dev/selenium/docs/api/javascript/module-selenium-webdriver_chromium-Driver.html#setNetworkConditions)
- [.sendDevToolsCommand()](https://www.selenium.dev/selenium/docs/api/javascript/module-selenium-webdriver_chromium-Driver.html#sendDevToolsCommand)
- [.sendAndGetDevToolsCommand()](https://www.selenium.dev/selenium/docs/api/javascript/module-selenium-webdriver_chromium-Driver.html#sendAndGetDevToolsCommand)
- [.setPermission()](https://www.selenium.dev/selenium/docs/api/javascript/module-selenium-webdriver_chromium-Driver.html#setPermission)
- [.setDownloadPath()](https://www.selenium.dev/selenium/docs/api/javascript/module-selenium-webdriver_chromium-Driver.html#setDownloadPath)
- [.getCastSinks()](https://www.selenium.dev/selenium/docs/api/javascript/module-selenium-webdriver_chromium-Driver.html#getCastSinks)
- [.setCastSinkToUse()](https://www.selenium.dev/selenium/docs/api/javascript/module-selenium-webdriver_chromium-Driver.html#setCastSinkToUse)
- [.startCastTabMirroring()](https://www.selenium.dev/selenium/docs/api/javascript/module-selenium-webdriver_chromium-Driver.html#startCastTabMirroring)
- [.getCastIssueMessage()](https://www.selenium.dev/selenium/docs/api/javascript/module-selenium-webdriver_chromium-Driver.html#getCastIssueMessage)
- [.stopCasting()](https://www.selenium.dev/selenium/docs/api/javascript/module-selenium-webdriver_chromium-Driver.html#stopCasting)

**More info:**

- [selenium-webdriver/chrome](https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/chrome.html)
- [selenium-webdriver/edge](https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/edge.html)

### Example:
### Example

<div class="sample-test"><pre data-language="javascript"><code class="language-javascript">describe('Chrome DevTools Example', function() {
it ('using CDP DOM Snapshot', async function() {
const dom = await browser.chrome.sendAndGetDevToolsCommand('DOMSnapshot.captureSnapshot', {
computedStyles: []
});
console.log('DOM', dom)
});
});</code></pre></div>
});</code></pre></div>

0 comments on commit 45ad29e

Please sign in to comment.