Click here to Skip to main content
15,921,028 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

i would lie to know that how i can declare and user WEbDriver object across all the tests and classes.

since WebDriver is the driver (firefix/IE/Opera..) so i wanted to use in all the classes to identifying webelements in th application,

currently am following as,
JavaScript
Class main(){
 Function Navigate(){
  WebDriver drive=New FireFoxDriver();
 }
}


but if i want use same driver in another class called getAll
currently am following as,

JavaScript
Class getAll(){
 Function Listval(){
   driver.getelement(by.id("jk") }
}


will it(driver object) work here(getAll class) ?

am new to this and going to use Webdriver selenium to automate the application.

I can appreciate you solution and keen to see.
Posted
Updated 6-Feb-12 2:13am
v4

1 solution

You will have more chance if you ask the Selenium Guys[^] this question.
We can always help with standard code, but if you are looking for product specific help, it is always better to go to source as there is no guarantee anyone here uses it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900