Skip to content

Instantly share code, notes, and snippets.

Created September 22, 2020 12:33
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
A sample js script for selenium 4 with Selenium JS binding
const {Builder,Buy,Key} = require("selenum-webdriver");
async function searchTest(){
// create and open a firefox driver object
let driver = await new Builder.forBrowser("firefox").build();
// navigate to
await driver.get("");
// locate the google search textbox and enter "Selenium 4", hit Enter key
await driver.findElement("q").sendKeys("Selenium 4",Key.RETURN));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment