• <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 的自動化測試架構(14)

    發表于:2017-04-11來源:gitbook作者:凌俁Linty?點擊數: 標簽:selenium
    Select:針對 select 元素進行的操作 selectByValue(value) selectByIndex(index) // 找到該 select 元素 we WebElement we = driver.findElement(by, selector); // 使用該元素,實例化一個

    Select:針對 <select>元素進行的操作

    • selectByValue(value)
    • selectByIndex(index)

      // 找到該 <select> 元素 we
      WebElement we = driver.findElement(by, selector);
      // 使用該元素,實例化一個 Select 類的對象 s
      Select s = new Select(we);
      s.selectByValue(value);
      // 或者用index
      s.selectByIndex(value)
      
  • 鼠標事件,有關鼠標的操作,不只是單擊,有時候還要做右擊、雙擊、拖動等操作。這些操作包含在ActionChains類中。

    • contextClick():右擊
    • douchClick():雙擊
    • dragAndDrop():拖拽
    • moveToElement():鼠標停在一個元素上
    • clickAndHold():按下鼠標左鍵在一個元素上
  • 原文轉自: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>