JavaScript Selenium Webdriver
/ *Syntax: JavascriptExecutor js = (JavascriptExecutor) driver; js.executeScript(Script,Arguments); script - The JavaScript to execute Arguments - The arguments to the script.(Optional)*/ JavascriptExecutor js = (JavascriptExecutor)driver; //Uncomment each scenario by using Ctrl + Shift + \ (backslash) and find the solution without using sendKeys() *//to type text in Selenium WebDriver without using sendKeys() method js.executeScript("document.getElementById('some id').value='someValue';"); js.executeScript("document.getElementById('Email').value='SoftwareTestingMaterial.com';");*/ click a button /*//to click a button in Selenium WebDriver using JavaScript //js.executeScript("arguments[0].click();", loginButton); ...