Tag Info

New answers tagged

2

The best way is to separate out the details of the WebElement and methods to do with clicking on it, into separate classes - keeping a separation between the code which directly interacts with the UI and the code which does the testing logic. This is a design pattern called the Page Object Model, and your code will end up looking a bit like this: package ...


1

Selenium standalone jar and testNg jars are missing . So just keep these jars in you Lib folder and this will resolve your problem. Since in build.xml you have provided jar location to lib folder. So please keep all your jar files in lib folder and this will start working without showing any error. Good Luck


0

I would do it on this way: Create a class with methods that you use to create new WebDriver instances as easy as possible. E.g.: WebDriver userOne = DriverBuilder.getUserOne(); WebDriver userTwo = DriverBuilder.getUserTwo(); With that you have two WebDriver instances and you can control each on them separate. You do not have to use different browsers. ...



Top 50 recent answers are included