Skip to main content

Posts

Showing posts from March, 2017

How to get testng emailable report from Jenkins machine to be attached to Jenkins build mail notification using surefire plugin

When we execute our test cases on our local machines, we will get the testng emailable report which is awesome summary. The same will not get generated on same path when we run our test cases on remote/slave node on Jenkins, we need to use surefire report plugin to fetch the same an get attached to Jenkins build mail notification. Please use the following snippet on your maven projects pom.xml file:- <build> <plugins> <plugin>     <groupId>org.apache.maven.plugins</groupId>     <artifactId>maven-surefire-plugin</artifactId>     <version>2.19.1</version>     <configuration>     <testFailureIgnore>true</testFailureIgnore>     <properties>             <property>                 <name>usedefaultlisteners</name>          ...

How to set Firefox(57.x) profile to work with selenium 3.7.1 with geckodriver 0.19.1

We need to use DesiredCapabilities to work on new firefox(57.x) browser using selenium 3.7.1 latest version as below. WebDriver driver; System.setProperty("webdriver.gecko.driver",System.getProperty("user.dir") + "/src/test/resources/geckodriver"); DesiredCapabilities capabilities = DesiredCapabilities.firefox(); FirefoxProfile profile = new FirefoxProfile(); capabilities.setCapability(FirefoxDriver.PROFILE, profile); capabilities.setCapability("acceptInsecureCerts", true); capabilities.setJavascriptEnablprofile.setPreference("browser.download.useDownloadDir", true); ed(true); capabilities.setCapability("marionette", true); System.setProperty("webdriver.gecko.driver","PATH TO/geckodriver.exe"); profile.setPreference("browser.download.folderList", 2); profile.setPreference("browser.download.manager.showWhenStarting", false); profile.setPreference("browser.download...

How to get firebug firepath work on latest firefox version

Open a firefox new tab, enter "about:config" on the URL portion & hit enter. now accept the risk message to enter to developer config mode. Once you reach config page, search for "browser.tabs.remote.autostart" using (ctrl+f). you will see 2 options for the searched term, toggle both options to set "false". now close the tab and reopen the firefox browser and open firebug tool. Enjoy!!!

Maven POM file dependencies for selenium 3.4.0 , firefox 52 , Testng 6.10 , geckodriver 0.17

To use latest Selenium 3.4.0 for our automation framework please use the latest dependencies[as of now] for your maven projects pom.xml. ... <dependencies> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>3.4.0</version> </dependency> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>6.10</version> <scope>test</scope> </dependency> <dependency>                      <groupId>com.google.guava</groupId>                      <artifac...