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

documentation: sample code for selenium-webdriver does not run #9134

Closed
jamesnewking opened this issue Feb 2, 2021 · 1 comment
Closed

Comments

@jamesnewking
Copy link

🐛 Bug Report

The sample code for selenium-webdriver has an extra ; in the middle of the code making it not able to execute.

https://www.selenium.dev/selenium/docs/api/javascript/index.html

To Reproduce

Under the Usage section of the page:

https://www.selenium.dev/selenium/docs/api/javascript/index.html

sample code

const {Builder, By, Key, until} = require('selenium-webdriver');

(async function example() {
  let driver = await new Builder().forBrowser('firefox').build();
  try {
    await driver.get('http://www.google.com/ncr');
    await driver.findElement(By.name('q'));.sendKeys('webdriver', Key.RETURN);
    await driver.wait(until.titleIs('webdriver - Google Search'), 1000);
  } finally {
    await driver.quit();
  }
})();

Expected behavior

The sample code should not have the extra ; in the middle of the driver.findElement function:

const {Builder, By, Key, until} = require('selenium-webdriver');

(async function example() {
  let driver = await new Builder().forBrowser('firefox').build();
  try {
    await driver.get('http://www.google.com/ncr');
    await driver.findElement(By.name('q')).sendKeys('webdriver', Key.RETURN);
    await driver.wait(until.titleIs('webdriver - Google Search'), 1000);
  } finally {
    await driver.quit();
  }
})();
@ghost ghost added the needs-triaging label Feb 2, 2021
@diemol
Copy link
Member

diemol commented Feb 2, 2021

This is a duplicate of #7635, the docs will be regenerated when we release beta-1.

@diemol diemol closed this as completed Feb 2, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants