How do you find element using Java Script?
Answers were Sorted based on User's Feedback
Hi,
By using javascriptexecutor we can perform tasks as below
I am entering text in textbox by passing ID.
JavascriptExecutor js= (JavascriptExecutor)driver;
js.executeScript("document.getElementById('vfb-9').value='Ramchandra Patil'");
| Is This Answer Correct ? | 12 Yes | 0 No |
How to press enter key on text box in selenium webdriver?
Explain how you can debug the tests in selenium ide?
How can we launch different browsers in selenium webdriver?
What is the function of xpath?
What is the difference between the commit and verify commands?
What is the purpose of creating a reference variable- 'driver' of type webdriver instead of directly creating a firefoxdriver object or any other driver's reference in the statement webdriver driver = new firefoxdriver();?
What are the uses of findelement() and findelements()?
What are the types of assertions there in selenium?
How to delete browser cookies with selenium web driver?
How can you mark a test case as failed by using soft assertion?
Tell me how can we launch different browsers in selenium webdriver?
Tell us what kind of keyboard operations can be performed in selenium?