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

Explain what is the difference between borland silk and selenium?

0 Answers  


Explain what is framework and what are the frameworks available in rc?

0 Answers  


How to handle a dropdown in selenium webdriver? How to select a value from dropdown?

0 Answers  


What is the main difference between web-driver and rc?

0 Answers  


What is a data driven framework?

0 Answers  






How can you mark a test case as failed by using soft assertion?

0 Answers  


How to run test case traced by employing ide in browsers?

0 Answers  


Explain xpath absolute and xpath attributes.

0 Answers  


How to click on a hyperlink using selenium webdriver?

0 Answers  


How to do file upload in selenium?

0 Answers  


What is junit annotations and what are different types of annotations which are useful?

0 Answers  


what is the difference between driver.get() and driver.navigate.to(“url”)?

0 Answers  


Categories