1. Start the session
driver = await new Builder().forBrowser('chrome').build();
2. Take action on browser
await driver.get('https://www.selenium.dev/selenium/web/web-form.html');
3. Request browser information
let title = await driver.getTitle();
4. Establish(설립하다) Waiting Strategy
await driver.manage().setTimeouts({implicit: 500});
5. Find an element
let textBox = await driver.findElement(By.name('my-text'));
let submitButton = await driver.findElement(By.css('button'));
6. Take action on element
await textBox.sendKeys('Selenium');
await submitButton.click();
7. Request element information
let value = await message.getText();
8. End the session
await driver.quit();
EXAMPLE Github source code
NEXT learn about Assert module
Top comments (0)