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 ?    12 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

What do you mean by xpath?

0 Answers  


What is XPath? How does it work?

0 Answers  


What are the different types of drivers available on Webdriver ?

0 Answers  


what is the difference between 2.0 & 3.0

0 Answers  


How can I read test data from excels?

0 Answers  






When should I use selenium grid?

0 Answers  


What you say in regards to the flexibility of selenium test suite?

0 Answers  


When should one use selenium grid?

0 Answers  


What are different forms of selenium?

0 Answers  


Can we use selenium rc to drive tests on two different browsers on one operating system without selenium grid?

0 Answers  


What are the prerequisites to run selenium webdriver?

0 Answers  


What are the popular programming languages supported by selenium webdriver to write test cases?

0 Answers  


Categories