Tag Info

Hot answers tagged

3

Steps: Open page with form Leave fields empty Submit form Wait for message to appear with an Explicit wait Assert message text and color are correct You can use .GetCSSValue("color") on a webElement to get its color value. For an example look at: http://stackoverflow.com/questions/19668893/getcssvalue-color-in-hex-format-in-selenium-webdriver


3

Short answer: Yes it is a bad practise, unless you have a very very very good reason, do not use implicit wait. This Stack Overflow answers really puts the difference in great detail. I once had someone on my team who thought it was a good idea, until I started researching why all our tests had such a long starting time. Somewhere in our setup the implicit ...


2

A quick search for Selenium tests on github results in multiple open-source projects hosting their test cases there. Wikia: https://github.com/Wikia/selenium-tests Jenkins CI: https://github.com/jenkinsci/selenium-tests Mozilla Addons: https://github.com/mozilla/Addon-Tests Other open-source project sites look at: http://sourceforge.net/ ...


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 ...


2

data-href is an attribute of a HTML tag, try to use get_attribute method, something like: url = browser.find_element_by_xpath("//a").get_attribute("data-href") For more information see: http://selenium-python.readthedocs.org/en/latest/api.html#selenium.webdriver.remote.webelement.WebElement.get_attribute Or this for examples: ...


2

Run all the tests just right after the build as soon as possible, before deploying to the test environment. Developers should have feedback about their check-ins as soon as possible. Also you say the test-env is used for manual testing, why would you want to risk deploying a non working build. Certainly if you could have run the tests first. In short the ...


2

If QA and DEV environments are equal (have the same dependencies installed, the same build, etc.), there is no much sense to run acceptance tests on both of them, since it will be just duplicated execution and additional overhead in terms of analysing test results on two environments instead of one. Acceptance tests are the tests which provide you ...


2

Quickly glanced over the properties and methods of IWebElement, doesn't look like they can set values. However, you can easily execute some javascript snippet to change HTML in your page. IWebDriver driver; IJavaScriptExecutor js = driver as IJavaScriptExecutor; js.ExecuteScript("document.getElementById("title").innerHTML = "New text!";"); You might need ...


1

This answer might not seem very useful right now, but tools which automatically generate xpath or css for an element pretty much never do a good job of creating a selector which is not brittle. I strongly advise that you spend a day or two learning in depth either xpath, or css (Webdriver supports either, css selectors tend to be a bit quicker) as it is ...


1

to my experience in automation test, it is more valuable to run in qa environment but you should communicate with developer frequently on changing part which may affect your automated test cases so you can prepare your automated test cases during development phase and give priority to more static features of the product to prevent updating automated cases ...


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

Webdriver is a browser manipulation API only and as such the ability to read office or PDF files is out of scope of its capabilities, but the office interop libraries will allow you to read data from office files in C#, and there will be similar libraries for reading PDF documents.


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