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

What is object repository? How can we create an object repository in selenium?

0 Answers  


What are the different type of locators?

2 Answers   Genpact,


What are the testing type supported by selenium webdriver?

0 Answers  


What are the different Selenium components?

0 Answers  


When to use autoit?

0 Answers  






What does a right-pointing green triangle at the beginning of a command in side indicate?

0 Answers  


What is the difference between borland silk and selenium?

0 Answers  


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

0 Answers  


What is the use of javascriptexecutor?

0 Answers  


what are the four parameters that have to be passed to selenium?

1 Answers  


In which format does source view show the script in selenium ide?

0 Answers  


What are the verification points available in selenium?

0 Answers  






Categories