セレンページの<input>タグの値と各属性の数を取得します。

 

ポジショニングを支援するために、ラベルのページ番号、ID、名前、クラス値を、取得

 

        リスト<WebElement> LW = driver.findElements(By.tagName( "入力"))。
        System.out.println(lw.size())。
        {:(LW WebElement webElement)について
//获取入力输入框属性ID、名前、クラス和文本框的值
            「| "+ webElement.getAttribute("名前のSystem.out.println(webElement.getAttribute( "ID")+ ")+" | "
            + webElement.getAttribute("クラス")+" | "+ webElement.getText()のtoString());。
        }

 

おすすめ

転載: www.cnblogs.com/zddwork/p/11328619.html