2017-02-03 13 views
0

RecyclerViewの下にフレームまたはテキストのリストを表示する方法。RecyclerViewの下にフレームまたはテキストのリストが表示されます。

常にウェブ要素のリストはnullを返します。表示のためにAppiumUI AutomatorViewerを使用してください。android app xpath

私は以下のコードを試しましたが、それは私のためには機能しませんでした。

WebElement plist = wd.findElement(By.xpath("//android.support.v7.widget.RecyclerView[contains(@resources-id,'id/patient_list_view') and @index='6']")); 

答えて

0

後述するようにあなたが回避することができ、

List<WebElement> alltheListfromView=driver.findElementsByXPath("//*[@resources-id,'id/patient_list_view']"); 
//Add if any other elements attributes are available 

for (WebElement elements: alltheListfromView) { 
    System.out.println(webElement.getText()); 

} 
関連する問題