<ruby id="h6500"><table id="h6500"></table></ruby>
    1. <ruby id="h6500"><video id="h6500"></video></ruby>
          1. <progress id="h6500"><u id="h6500"><form id="h6500"></form></u></progress>

            基于 SELENIUM 的自動(dòng)化測試架構(14)

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

            Select:針對 <select>元素進(jìn)行的操作

            • selectByValue(value)
            • selectByIndex(index)

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

            • contextClick():右擊
            • douchClick():雙擊
            • dragAndDrop():拖拽
            • moveToElement():鼠標停在一個(gè)元素上
            • clickAndHold():按下鼠標左鍵在一個(gè)元素上
          3. 原文轉自:http://gitbook.cn/books/58e54b57cfcd6fa52dcef1d2/index.html

          4. ...
            老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月
              <ruby id="h6500"><table id="h6500"></table></ruby>
              1. <ruby id="h6500"><video id="h6500"></video></ruby>
                    1. <progress id="h6500"><u id="h6500"><form id="h6500"></form></u></progress>