How do you find element using Java Script?

Answers were Sorted based on User's Feedback



How do you find element using Java Script?..

Answer / 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

How do you find element using Java Script?..

Answer / chetan phani.j

By using executeScript()

Is This Answer Correct ?    1 Yes 0 No

How do you find element using Java Script?..

Answer / kaviya

element.getElementsByTagName(tagname)

Is This Answer Correct ?    0 Yes 12 No

Post New Answer

More Selenium Interview Questions

How you can convert any selenium ide tests from selenese to another language?

0 Answers  


What is a fundamental difference between xpath and css selector?

0 Answers  


Explain me what are the main advantages of selenium?

0 Answers  


What is the testng.xml file used for?

0 Answers  


Explain what is the main difference between web-driver and rc?

0 Answers  






What is the difference between captureentirepagescreenshot and capturescreenshot?

0 Answers  


difference between Implicit Wait and Explicit Wait with syntax.?

8 Answers   HCL,


What are the testing kinds that can be supported by selenium?

0 Answers  


How to locate a link using its text in selenium?

0 Answers  


How can we handle window ui elements and window pop ups using selenium?

0 Answers  


What are the significant changes/upgrades in various selenium versions?

0 Answers  


How to handle ajax calls in selenium webdriver?

0 Answers  


Categories