Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How do you find element using Java Script?

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to export selenium ide test suite to selenium rc suites?

1002


Write the code for reading and writing to excel through selenium?

981


How do perform drag and drop using selenium webdriver?

983


How can we clear a text written in a textbox?

1051


How to assert the title of the web page?

914


What is the alternative to driver.get() method to open an url using selenium webdriver?

1318


How selenium grid hub keeps in touch with rc slave machine?

934


What can cause a selenium ide test to fail?

1053


What is page object model or pom?

1027


What are the advantages of pom?

982


How does testng allow you to state dependencies? Explain it with an example.

3533


How is assert command different from verify command?

1222


What is webdriverbackedselenium?

1138


What is the hybrid framework?

1056


How can we deal with web-based pop-up?

989