Wednesday 28 August 2013

how to handle pop up authentication message box for Chrome, IE and Firefox

Some websites need to pass pop up authentication Required message boxes.

To enter user id and password automatically we can handle in many ways.

1) By adding user id and password before start of url
http://usename:password@websitename.com
2) By using Auto it tool
http://stackoverflow.com/questions/14621212/autoit-code-for-handling-windows-authentication-pop-up-using-selenium-webdriver

Working example

http://learnwebdriver.blogspot.co.uk/p/autoit.html

3) By using Sikuli tool.

Sometimes authentication is necessary before a test case can be executed. While HtmlUnit based tests can easily enter and confirm authentication requests, most browser based tests, cannot workaround the dialog. This is a browser security measure to prevent automated data capture and/or data entering. WebDriver for Firefox delivers a solution for that problem, but IE and Chrome rely on a manual interaction with the browser before the test automation can run.
 Working code example is available here
http://blog.xceptance.com/2012/02/25/handle-authentication-during-webdriver-testing/

http://sikuli.org

How to use Sikuli in Selenium or How to test images by using Selenium

SikuliFirefoxDriver

SikuliFirefoxDriver extends Selenium's FirefoxDriver by adding Sikuli's image search capability. It is useful for automating interactions with highly visual interfaces such as Google Maps or logos for any images on your website.

For more details with code example please follow on this link.

http://code.google.com/p/sikuli-api/wiki/SikuliWebDriver

http://stackoverflow.com/questions/17283091/sikuli-selenium-testing-on-jenkins-allow-the-browser-to-be-launched-in-the-for

http://www.uvnc.com/downloads/ultravnc.html

If you are using Maven build tool.. Please use this dependency to download jar files

<dependency>
        <groupId>org.sikuli</groupId>
        <artifactId>sikuli-webdriver</artifactId>
        <version>1.0.1</version>
</dependency>
 
http://sikuli.org 
 
For Selenium Grid
 
http://autumnator.wordpress.com/2011/12/22/autoit-sikuli-and-other-tools-with-selenium-grid/ 

Monday 12 August 2013

how to import java maven project into eclipse

How to import java maven project into eclipse pom.xml

File-> Import



Click on Maven it will expand the tree..

Select Existing maven project and then click on Next button.


Here you have to click on Browse button and select the folder where ever you have placed the project .
Just select pom.xml then click on Finish button.

Consequently it will import all folders of project into your eclipse.

how to import ant java project into eclipse build.xml

To import java project into eclipse

On your eclipse go to this path

1.  Go to File -> New  ->  Project
2.  Select "Java Project from Existing Ant Bundle"


Click on Project

Select "Java Project from Existing Ant Bundle" after that click on next


Click on Browse button and select path of your project folder where you have placed

Now select build.xml file... this file is enough.. no need to select all folder...

whenever you click on open... automatically all folders will import into your eclipse.

You can get more details from here
http://jonnyman9.blogspot.co.uk/2012/06/how-i-imported-ant-project-into-eclipse.html