• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • 基于 SELENIUM 的自動化測試架構(22)

    發表于:2017-04-11來源:gitbook作者:凌俁Linty?點擊數: 標簽:selenium
    @throws InterruptedException */ @Test public void test01ChangeLanguage () throws InterruptedException { WebDriver driver = this .baseDriver; driver.get( this .baseUrl); Thread.sleep( 2000 ); // 點擊語
    @throws InterruptedException */ @Test public void test01ChangeLanguage() throws InterruptedException { WebDriver driver = this.baseDriver; driver.get(this.baseUrl); Thread.sleep(2000); // 點擊語言按鈕 driver.findElement(By.cssSelector("#langs > button")).click(); Thread.sleep(500); // 用Css Selector 選擇 英文 driver.findElement(By.cssSelector("#langs > ul > li:nth-child(3) > a")).click(); // 瀏覽器需要刷新,等待2秒鐘 Thread.sleep(2000); // 檢查按鈕上的字是不是變成了 English String expected_language = "English"; String actual_language = driver.findElement(By.cssSelector("#langs > button")).getText(); Assert.assertEquals(actual_language, expected_language); } /** * 測試前置條件 * 在所有的測試開始前 執行一次 */

    原文轉自:http://gitbook.cn/books/58e54b57cfcd6fa52dcef1d2/index.html

    ...
    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>