Tag Info

Hot answers tagged

4

I do not know what features QC delivers for running automated tests, but this is what I would do to maintain a Selenium test-suite: As a test runner for Selenium just use a unit-test runner in the language you are developing your tests in. Most xUnit-tests runners generate the same result files, which can be parsed by report generators for reporting. To ...


3

Some good Selenium tutorial for beginner/Intermediate/Advance are given below : 1 - ToolsQA 2 - Guru99


3

We have had a very hard time automating the Google Maps API. Test case: Surf to Google maps: https://www.google.nl/maps Find an area with known location Click the known location (without the use of mouse-coordinates, should also work when zooming, etc...) Verify the location box with details opens Retrieve the phone number This is very hard, because ...


2

Converting Telerik Test Studio cases into Selenium WebDriver will require a lot of rework, because Test Studio uses completely different technology, framework and syntax for example you find logic expression are different. The only benefit you can get if you have used Nunit in both Test Studio and Selenium WebDriver, as both tools are compatible with Nunit, ...


2

If it is a browser pop-up, you'll need to switchTo() that window. Otherwise (modal/light-box) you shouldn't have an issue finding it in the DOM using DevTools' element highlighter.


2

@FindBy(css="a[dta-qid='inventory']") I've used that kind of locators in my last project and it's worked like charm. I hope this is that You want :)


2

The Wikia project has their Selenium tests online, looks like a little bit more then just examples. It contains a Page object factory and hundreds of tests and looks like it is pretty active with multiple commits per day. The test cases: https://github.com/Wikia/selenium-tests/tree/master/src/test/java/com/wikia/webdriver/testcases I found this when I ...


2

"Test automation" means more than just automating user interfaces that run in a web browser. Someone with good programming skills should be able to find many other ways to use software to test software. Here are are couple of examples: Write API-level integration tests. If developers test, they probably focus on unit tests. There is a middle ground ...


2

If you need to go by something else than id, check this link. In your case, you can use className or xpath or css - depending on your exact HTML code. So for example, you could have something like: @FindBy(how = How.className, using = "login") private WebElement passwordField; This way, you can define the login buttons in a broader sense so all of them ...


1

Adding to Niels answer that CI-Servers like Jenkins are the tool of choice for automated test execution (which I strongly support), I like to point out that there are also plugins available for transferring the test results from Jenkins to a full blown test management application for archiving and reporting as well as merging them with other test results as ...


1

best practice will be to use page object design pattern. Then, each page has login method, which does login in a page-specific way.


1

A CMS can be challenging. You have content moving, user permissions, generated IDs, etc. Try out WordPress. I snapped out of the automation boredom once I hired someone to take it over and I took on security testing and process improvement. Start with OWASP for security.


1

I think Single Page Applications type which last time gains more and more popularity can be hard to automate, because this type of pages are dynamically loaded. Every action on page can load new div from server without reloading whole page, just for example simple paste table to div. Webdriver cache webelements on page load, and dynamical loading of html ...


1

Where can I find sample or real Selenium projects. You can find selenium sample code and projects at the below mentioned links https://code.google.com/p/selenium/wiki/GettingStarted http://examples.javacodegeeks.com/enterprise-java/testng/testng-selenium-integration-example/ http://www.qaautomation.net/?p=263 Yes, these are the sample codes, which ...


1

Selenium IDE does not provide a way to compare images. You can retrieve pixels from an image in Javascript, but only if the image is in a Canvas element. I suspect you can find a command-line program that checks whether two images are identical. (It might be as simple as a byte-by-byte comparison of two files.) Some tools are more sophisticated; see for ...


1

You have several choices, although none are perfect. In the order I prefer to use them: Database/data manipulation - unless you have a ridiculously complex data structure (been there) or no access to the database in question (been there, too), this is the simplest, safest way to manipulate expiry/deadlines. Setup/configuration manipulation - configure your ...


1

I am going to coin this user246's First Law of Testing: everyone who tests software will eventually need to test something with a deadline. (I'm sure several hundred thousand other testers have coined the same law.) Although the specifics vary from one problem to the next, there are two essential solutions: either change the clock or change the deadline. ...


1

I tried using image comparison before with Telerik Test Studio. It did the job, but my app at the time changed so much that it was too much effort to update the test with a new image. I am sure there are other tools out there, but I would only go after it if your image will remain fairly static.


1

I try the scroll down with loop, it's great with Python. #!/usr/bin/python # -*- coding: utf8 -*- scroll_time = 13 ... scroll = driver.find_element_by_id("element_name") for num in range(0, scroll_time): scroll.send_keys(Keys.PAGE_DOWN) ...


1

The problem is that you don't switch to opened window, and webdriver searches for elements in the old page instead of the newly opened one. Solution: String winHandleBefore = driver.getWindowHandle(); for(String winHandle : driver.getWindowHandles()){ driver.switchTo().window(winHandle); } This java method's part switches to ...


1

Try out Galen; it's designed for testing responsive web design across different platforms and different sized viewports, so its all about how web elements are laid out on screen: Layout testing seemed always a complex task. Galen Framework offers a simple solution: test location of objects relatively to each other on page. Using a special syntax and ...


1

Don't use Thread.sleep or ImplicitlyWait. The best way to wait something is explicit wait. Try to use new WebDriverWait(driver, 60).until(new ExpectedCondition<Boolean>() { @Override public Boolean apply(WebDriver webDriver) { return // check if file downloaded } ...



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