您的位置:軟件測試 > 開源軟件測試 > 開源功能測試工具 > Selenium
selenium RC 環(huán)境配置
作者:網(wǎng)絡轉(zhuǎn)載 發(fā)布時間:[ 2013/4/3 14:31:14 ] 推薦標簽:

.....selenium-remote-control-1.0.3selenium-server-1.0.3

下面把我們錄制的腳本導出并放置到入出。

將代碼出為junit 4 類型的代碼,我這里保存為test.java 并復制到我的項目中。

Src文件夾下的com.test包中:

代碼內(nèi)容如下:

package com.test;

import com.thoughtworks.selenium.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.util.regex.Pattern;

public class test extends SeleneseTestCase {
    @Before
    public void setUp() throws Exception {
        selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://www.baidu.com/");
//這里如果運行不了,修改瀏覽器為 *firefox  或  *iexplore
        selenium.start();
    }

上一頁1234下一頁
軟件測試工具 | 聯(lián)系我們 | 投訴建議 | 誠聘英才 | 申請使用列表 | 網(wǎng)站地圖
滬ICP備07036474 2003-2017 版權(quán)所有 上海澤眾軟件科技有限公司 Shanghai ZeZhong Software Co.,Ltd