Selenium Interview Questions on Textbox
1. How to type into a text box using selenium webdriver?
We have different ways to type text into textbox/textfield or text area
1. Using sendkeys - driver.findElement(locator).sendKeys("text");
2. Using JavascriptExecutor document.getElementById
JavascriptExecutor jse = (JavascriptExecutor)driver;
jse.executeScript("document.getElementById('id').setAttribute('value','text')");
3. Using JavascriptExecutor arguments[0].value
jse.executeScript("arguments[0].value='enter the value here';", WebElement);
I have found great and massive information. Thanks for sharing
ReplyDeleteSelenium Online Training Hyderabad
Selenium Testing Course Online