Tag Info

Hot 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


1

If you have some input fields, most likely you also have some limitations related to max. number of chars which user can enter there. Let's say you have text input field which allows user to enter up to (and inclusive) 255 chars. In this case simplified test scenarios will be: User enters any number of valid chars (the number of chars should be <255) ...


1

Yes, it most certainly does. Selenium can only address elements once they're loaded, but that loading (controls, ajax calls, ...) is depending on your connection (and browser). In fact, I had a perfectly working script with nice explicit waits for our test environment. But the execution on the production website went bad in places, because the ajax calls ...


1

At this point of time it doesn't matter which language you'll start with, 'cause both are relatively easy to learn considering the number of educational resources available. The more important thing is the language your application under test is developed with. In case when the application under test written in Java and you do your automated testing ...


1

I made your code readable. Please do that from now on. Your flow is as follows... if span[1] is not selected then click span[1] else if span[2] is not selected then click span[2] Please clarify what precisely is happening so we can help you properly. EDIT As I mention above your second part is checking if span[2] is not selected... If Element 1 ...



Only top voted, non community-wiki answers of a minimum length are eligible