2016-10-09 13 views
0

ScrollToは廃止されましたが、ページ上の任意のWeb要素のscrollToには良い解決策が見つかりませんでした。ScrollToとScrollToExactをスクロールする方法

質問:

誰かが私は、C#(Androidデバイス)になりましたことを行うための最善の方法だかを把握助けてくださいことができますか?

答えて

2

ScrollToとScrollToExact後に右手ScrollToは廃止されたそう、ここでは詳細については

MobileElement radioGroup = (MobileElement) wd 
       .findElementByAndroidUIAutomator("new UiScrollable(new UiSelector()" 
         + ".resourceId(\"<your listview or any scrollview id>\")).scrollIntoView(" 
         + "new UiSelector().text(\"+<your text>+\"));"); 
     radioGroup.click(); 

を別の解決策を見つけて下さいこのビデオをチェックしてください: https://www.youtube.com/watch?v=bT3tqaLNn-Y

1

私の理解するには、スクロールするために使用できる唯一の方法は、あなたはおそらく方法上記及び下記の方法を使用してswipeTo機能を構築することができます

driver.swipe(int startx, int endx, int starty, int endy, int duration); 

です:

driver.manage().window.size().getHeight() // and .getWidth() 
//Note I am recalling that one from memory as I do not have access to my appium program currently 
el.getLocation().getX() //getY() 
el.getSize().getWidth() // getHeight() 

少しで数学の場合は、これらをswipeToメソッドに変換する可能性があります。

関連する問題