Hot answers tagged

4

Yes and you're definitely ahead of the crowd already with the plan you've laid out. Additional considerations: In addition to using a Page Object Model, consider a central place for hard coded values (simple methods that return a string in some cases). So the identifiers for the css locator for last_name are in one place (along with other css element ...


2

This shows how. "TestNG is used to enable parallel execution on runner level"


2

Use contains() or starts-with() function in xpah : Solution : With contains : //div[contains(@id,'post-body')]/div[1]/form[1]/input[1] With starts-with : //div[starts-with(@id,'post-body')]/div[1]/form[1]/input[1] Let me know If any query.


2

Selenium is a software library to locate elements on web page and interact with them. To deal with images, you need to use different library. Selenium can provide screenshots (images) but you need to use something else to work with such images. As a programmer, you need to master more than a single library, and learn to use right tool for the job.


1

You can calculate hash of images and then compare the hashes for equality. SO has a question on calculating hash


1

I haven't tried it but there's a Chrome Extension called Selenium Page Object Generator that looks like it automates PO creation, and it supports C#. SWD Page Recorder also automates PO creation, and supports C#.


1

My current Solution. Parses through the HTML file (C:\QA\Test.html), finds all input tags and Select tags, if they have an ID it will convert them into a POM based format. It then prints out to C:\QA\Pom.txt the basic object for it. Overall, it does 90% of the work that I need, with minor editing. using System; using System.Linq; using System.IO; using ...


1

One non-selenium tool we use (we use the paid version) is GhostInspector which has several options for screenshots including comparing by % difference and by css selectors to target areas.


1

Use Sikulix API. Sikuli is a library that will help you compare two images or recognize images when they are displayed on your screen. After the said image is displayed, you can click on the recognized image. Download Link: http://www.sikulix.com/ Go for the download link: https://launchpad.net/sikuli/sikulix/1.1.0 Download sikulix-setup-1.1.0.jar Run ...


1

WebElement element=driver.findElement(By.xpath("(//div[@class='selectItemText'])[2]")); Thread.sleep(5000); element.click(); Thread.sleep(10000); driver.findElement(By.xpath("(//nobr[text( )='MDialog'])[4]")).click(); //driver.findElement(By.xpath("//nobr[text()='MDialog']")).click(); ...


1

Javascript support for webdriver is pretty rough, so here's an example of this in Javascript, in case you're like me and need to go spend another half hour digging through documentation to find the right method names in JS: let profile = new firefox.Profile(); profile.setPreference('network.automatic-ntlm-auth.trusted-uris', '.company.com') let options = ...


1

Selenium does not have the capability to automate the desktop applications.It cannot recognize the objects in a desktop application. Selenium drives the testing using the driver object that identifies the elements on screen using id, cssselector, xpath etc. which are not present in a desktop app. Though there is ID behind the elements in a desktop app but as ...



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