Showing posts with label Selenium. Show all posts
Showing posts with label Selenium. Show all posts

Road to run selenium test on custom Firefox profile

Following are the steps to create Firefox profile and launch selenium server.
1. Click start button >> Go to Run.
2. Type firefox.exe –P and click on OK button.

PHP Selenium RC data driven testing

In this post I will cover the procedure of data driven testing in selenium RC with phpunit framework.  PHP unit provide @dataProvider provider annotation.

In this post I have created a data driven test script in phpunit on Wikipedia where I put some country data in to excel file.

Start with Java Selenium RC - Procedure to create first test script for the beginners

Prerequisites:
  1. Download Selenium2 jar file from http://seleniumhq.org/download/.
  2. Download TestNG jar file from http://testng.org/doc/download.html
  3. Download and Install JDK and setup java path 
  4. Download Eclipse IDE from http://www.eclipse.org/downloads/
  5. Install TestNG plugin in downloaded eclipse
  6. Firefox should be install with selenium IDE plugin.
Step by step to creating first script:

1. Project creation: 
Open eclipse IDE  and chose work space.

User-Extensions js file with Selenium RC

1 –  Create user extensions file and place your user-extension.js file in the same directory where Selenium Server.
Run selenium server using below command.
java -jar selenium-server.jar -userExtensions user-extensions.js
Note: User extension file name must be same as user-extensions.js file 
2. Create an HttpCommandProcessor object with in class scope (outside the Test method)
selenium = new Def HttpCommandProcessor proc;

Start with Python Selenium RC - Procedure to create first test script for the beginners

Prerequisite:
  1. Python should be installed and set up path in your machine. Download Python from http://www.python.org/getit/
  2. Download Selenium2 jar file from http://seleniumhq.org/download/.
  3. Install easy_install using code from link "http://peak.telecommunity.com/dist/ez_setup.py" . Just copy code from url and past in a new  created python file like “setup.py”
  4. Put “setup.py” file in where python installed and run “setup.py” file as below command  >python setup.py
  5. After successfully execution a Scripts folder created under Pyhon installed directory. setup “Script”    folder path in your machine.
  6. Install selenium 2 in your system using command: > easy_install selenium

How to create and Run scripts:

Now your system is ready to execute python selenium RC scripts. Copy and past below code in  python file like “PythonSelenium.py”