qileilove

          blog已經(jīng)轉(zhuǎn)移至github,大家請訪問 http://qaseven.github.io/

          Selenium RC 環(huán)境搭建(eclipse)

           關(guān)于Selenium RC的原理,還是Selenium私房菜系列6比較詳細。 雖然我只看懂了組成。
            按照上面的步驟,搭建后的工程:
            一個簡單的Case,不完整,純粹為了測試環(huán)境是否搭成功。
          package com.dhy.selenium.test;
          import java.net.URL;
          import org.openqa.selenium.By;
          import org.openqa.selenium.WebDriver;
          import org.openqa.selenium.WebElement;
          import org.openqa.selenium.firefox.FirefoxDriver;
          import org.openqa.selenium.remote.RemoteWebDriver;
          import org.openqa.selenium.remote.DesiredCapabilities;
          public class Case1 {
          public static void main(String[] args) throws Exception{
          //        WebDriver driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"),
          //                DesiredCapabilities.firefox());
          WebDriver driver = new FirefoxDriver();
          driver.get("http://2j.isurveylink.com/s/183/?test_mode=1");
          WebElement element = driver.findElement(By.id("start_btn"));
          element.click();
          try {
          Thread.sleep(3000);
          } catch (InterruptedException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
          }
          System.out.println("Page title is : " + driver.getTitle());
          driver.quit();
          }
          }
            這里的語法啊、類啊什么的,需要慢慢研究。

          posted on 2014-10-30 11:05 順其自然EVO 閱讀(331) 評論(0)  編輯  收藏 所屬分類: 測試學習專欄selenium and watir webdrivers 自動化測試學習

          <2014年10月>
          2829301234
          567891011
          12131415161718
          19202122232425
          2627282930311
          2345678

          導航

          統(tǒng)計

          常用鏈接

          留言簿(55)

          隨筆分類

          隨筆檔案

          文章分類

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 北票市| 界首市| 呼图壁县| 仙桃市| 当雄县| 奉新县| 哈尔滨市| 石狮市| 沙田区| 醴陵市| 镇雄县| 黔西| 五台县| 恩施市| 开江县| 三都| 湾仔区| 凌源市| 广宗县| 化德县| 双流县| 合作市| 定兴县| 历史| 息烽县| 县级市| 麻栗坡县| 安陆市| 方城县| 远安县| 宜黄县| 尼玛县| 双城市| 静海县| 临沧市| 磐石市| 大渡口区| 吴川市| 临汾市| 琼海市| 赤城县|