Hot answers tagged

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.


2

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


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

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


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



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