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

Tell us what selenium components do you know?

0 Answers  


What is htmlunitdriver?

0 Answers  


When to use accessors in selenium?

0 Answers  


Explain how you will login into any site if it is showing any authentication popup for username and password?

0 Answers  


How to create batch(.bat) file after creating suite from TestNG?Can anyone explain entire process?

2 Answers   Cube Digi,






List some of the operating systems that are supported by selenium webdriver.

0 Answers  


How you can insert a start point in selenium ide?

0 Answers  


What are the different mouse actions that can be performed?

0 Answers  


What is the alternate way to click on the login button?

0 Answers  


Explain about selenium-grid ?

0 Answers  


Which are the operating systems supported by selenium?

0 Answers  


How to handle the AJAX popup window?

0 Answers  






Categories