Selenium RC的安装,配置和交互

上一篇 / 下一篇  2009-02-13 18:10:55 / 个人分类:Selenium RC

转载

Hi All,
 
In this article I will tell you how you can install and use Selenium RC(the best open source web testing tool and multi browser testing). I have been using Selenium RC for a while now and found it very useful to test web based applications. I have found that there is no installation and user guide for Selenium RC.
 
First download selenium-remote-control-1.0-SNAPSHOT i.e. the nightly build from thehttp://seleniumrc.openqa.org/download.html. There is some issue with Version 1.0 beta 1 (run time error when running on IE browser).
 
This is a zip file so, unzip the file and save it in ur c drive (Folder selenium-remote-control-1.0-SNAPSHOT).  Create a folder called Seleniumin your c drive and a sub folder called tests in c:\Selenium. Save all you selenium scrīpts in C:\Selenium\Tests\. 
 
Before runing first thing is close all Firefox browser windows and follow the instructions given below.
 
Open the Windows "Start" menu, select "Run" (on Windows Vista, use "Start Search" or enable the Run box, as described here) then type and enter one of the following:

    * firefox.exe -profilemanager
    * firefox.exe -P
 
For more details go tohttp://kb.mozillazine.org/Profile_Manager
 
When creating the profile manager you will have to create it under  a new folder C:\Firefoxselenium.
 
Once the profile manager is created you will have to create two batch file (.bat); one for IE and the other for Firefox.
 
This is an example of the SeleniumFirefox.bat file.
 
cd
\ cd C:\selenium-remote-control-1.0-SNAPSHOT\selenium-server-1.0-SNAPSHOT
java -jar selenium-server.jar -port 4545 -firefoxProfileTemplate C:\Firefoxselenium -htmlSuite chromehttp://www.yourtestwebsite.com//C:\selenium\G_alltestff.html* C:\selenium\*Results.html*
pause 
 
This is an example of the SeleniumIE.bat file.
 
cd
\ cd C:\selenium-remote-control-1.0-SNAPSHOT\selenium-server-1.0-SNAPSHOT
java -jar selenium-server.jar -port 4545  -htmlSuite iehtahttp://www.yourtestwebsite.com//C:\selenium\G_alltestie.html* C:\selenium\*Results.html*
pause 
 
Next step is to create G_alltestff.html (For Firefox)
 
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>Test Suite</title>
</head>
<table id="suiteTable"    cellpadding="1"
           cellspacing="1"
           border="1"
           class="selenium">
        <tbody>
                        <tr><td><b>Test Suite</b></td></tr>
                            <tr><td><a href=".\Tests\Name of you selenium scrīpt.html">Name of the scrīpt</a></td></tr>
    </tbody>
  </table>
</body>
</html>
 
Next step is to create G_alltestie.html (For Firefox)
 
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>Test Suite</title>
</head>
<table id="suiteTable"    cellpadding="1"
           cellspacing="1"
           border="1"
           class="selenium">
        <tbody>
                        <tr><td><b>Test Suite</b></td></tr>
                            <tr><td><a href="C:\Selenium\Tests\Name of you selenium scrīpt.html">Name of the scrīpt</a></td></tr>
    </tbody>
  </table>
</body>
</html>
 
Once you have done this you are all set to rock and roll. To run Selenium RC on Firefox double click on  SeleniumFirefox.bat file and to run Selenium RC on IE double click on  SeleniumIE.bat. Selenium RC is a very useful tool and I feel it’s very stable that Selenium IDE.
 
I would also like to thank my colleague Wedi Wun for helping me write the Selenium RC installation and user guide.To know more about Selenium RC/IDE Data driven testing see my article Data Driven Selenium using Excel Macros.
 
Cheers
Pavan Puddupakkam


TAG: 安装 Selenium RC

引用 删除 here556   /   2011-03-18 11:48:13
5
 

评分:0

我来说两句

日历

« 2024-05-23  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 36252
  • 日志数: 9
  • 图片数: 1
  • 文件数: 1
  • 建立时间: 2009-02-13
  • 更新时间: 2015-10-12

RSS订阅

Open Toolbar