[英]Is there a way to bypass downloading of a jnlp file when using a web automation tool?
[英]JNLP File App Automation using marathon java driver
我正在使用Java驅動程序馬拉松自動化表單應用程序。 我可以從自動化代碼中啟動該應用程序,然后導航至阻止的屏幕。
有一張表我想讀取數據,我有反編譯的Java代碼。 此方法成功返回焦點所在的行。
driver.findElement(By.name("ListView229")).getAttribute("getFocusedRow");
getFocusedRow
是一個Java方法,我可以像上面那樣調用它。
現在我想打電話給=>
public final String getCellData(int paramInt1, int paramInt2)
driver.findElement(By.name("ListView229")).getAttribute("getCellData(1,0)";
我使用了上面的代碼,但是返回了null,我可以調用沒有參數的java方法。
如何調用具有參數的java方法?
您需要使用driver.execute_script
來調用需要參數的getter。 以下應該工作:
WebElement e = driver.findElement(By.name("ListView229"));
String s = driver.executeScript("return $1.getCellData(1, 0);", e);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.