How do you find element using Java Script?

Answer Posted / grbhniti@yahoo.co.in

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 ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the price of selenium license per server?

591


How will you find an element using selenium?

496


What are the different methods to refresh a web page in webdriver?

497


What are the capabilities of selenium ide?

529


How to send alt/shift/control key in selenium webdriver?

1055






What is Selenium IDE?

550


What is the reason to use the selenium grid?

571


What do you know about Selenium IDE?

536


How to switch between frames in selenium?

508


Explain how selenium grid works?

684


How to enter text in the HTML text box without invoking the SendKeys ()?

555


Mention when to use autoit?

504


How to execute javascript in selenium?

542


What are the advantages of selenium as a test tool?

452


What is the selenium ide and what is it used for?

551