"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;
Showing posts with label Selenium - Get Started. Show all posts
Showing posts with label Selenium - Get Started. Show all posts

February 24, 2013

Selenium Builder - Magic Tool for Web Testing

Selenium Builder tool caught my attention from recent selenium post. Selenium IDE is available past few years. It is very useful, robust to get started. The challenging problem for me was fixing XPATH related issues prior to web driver implementation. Selenium Builder seems to remove some of those pain points. In a quick dry run I found below things impressive about Selenium builder.


1. Converting from Selenium 1 to 2
2. Alternatives Suggestions for actions is amazing

3. Run Locally or against Selenium Instance


Earlier we have seen BITE - Browser Integration Test Environment - File Bugs from Browser Level

We Can Simplifying Manual Web Test Process by using
  • Selenium Builder to Records your exploratory tests and replay it for every build
  • Any error encountered File Bugs using BITE
  • Filing bugs is simpler, lot of details attached with bugs filed using BITE and reduces bug logging time
Selenium IDE + Selenium Builder + BITE are powerful set tools for web testers and also right set of tools to get started with automation

Happy Re-Learning!!!

June 19, 2010

Learning Selenium – Part I


Please find Selenium example Walkthru. (Win 7- 64 bit)

2. Download Testng from http://testng.org/doc/download.html

3. Run Command Prompt in administrator mode. Start Selenium Server. Command is - java -jar selenium-server.jar. To Run in Single Window, you need to specify java -jar selenium-server.jar -singleWindow

4. Second very good walkthrough is available in http://epyramid.wordpress.com/2008/11/26/setting-up-selenium-rc-testng-using-eclipse/. This link does not seem to exist now, You need to download Eclipse IDE for Java Developers. (Check Links - Link1)

5. Run Eclipse program as Administrator

6. Got Error ‘Failed to start new browser session: java.lang.RuntimeException: Firefox 3 could not be found in the path! Please add the directory containing firefox.exe to your PATH environment’

7. Fix is below line of code
selenium = new DefaultSelenium("localhost", 4444, "*firefox C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe",http://yahoo.com/);

8. Modified code as per example in below page - http://seleniumhq.org/docs/05_selenium_rc.html

9. Code Example
import com.thoughtworks.selenium.*;
import org.testng.annotations.*;
import static org.testng.Assert.*;
public class GoogleTest
{
public Selenium selenium;
public void setup()
{
    selenium = new DefaultSelenium("localhost", 4444, "*firefox C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe","http://google.com");
    selenium.start();
}
public void search()
{
    selenium.open("http://www.Google.com/");
    selenium.type("q", "selenium rc");
    selenium.click("btnG");
    selenium.waitForPageToLoad("30000");
    assertTrue(selenium.isTextPresent("seleniumhq.org"));
}
public static void main(String arg[])
{
    GoogleTest g = new GoogleTest();
    g.setup();
    g.search();
}
}

Snapshot of Example
















10. Export it as Ant Files. Select Export Option by right click on the Project node. Choose ANT build files from below window


11. Choose the Project to create ANT build file

Reference Link. Build file created with all the contents of the project.
TestNG makes Java unit testing a breeze
Cedric Beust - Test NG
Data Driven Testing using Selenium & TestNG Part 1 of 4
Selenium Remote Control and TestNG

More Reads
Login Scenario - Providing Login Detail from Excel Sheet
Data Driven Testing Using Selenium RC with TestNG
WebDriver with Excelsheet


Happy Reading!!