1

I am automating a forms application using java driver marathon. I can launch the application from the automation code and navigate to following the blocked screen.

There is a table where I want to read the data, I have the decompiled java code with me. This method returns the focused row successfully.

driver.findElement(By.name("ListView229")).getAttribute("getFocusedRow");

getFocusedRow is a java method I can call it like above.

Now I want to call the =>

public final String getCellData(int paramInt1, int paramInt2)

driver.findElement(By.name("ListView229")).getAttribute("getCellData(1,0)";

I used the above code but returns null, I can call the java methods which does not have parameters.

How I can call the java methods which have parameters?

Tanveer Munir
  • 1,956
  • 1
  • 12
  • 27

1 Answers1

0

You need to use driver.execute_script to call the getters that require parameters. The following should work:

WebElement e = driver.findElement(By.name("ListView229"));
String s = driver.executeScript("return $1.getCellData(1, 0);", e);
Dakshinamurthy Karra
  • 5,353
  • 1
  • 17
  • 28
  • Tried the same but getting the below error. ('org.openqa.selenium.WebDriverException: net.sourceforge.marathon.javaagent.JavaAgentException:Script execution failed with an exception ([source error] no such class: oracle.forms.ui.ListView Command duration or timeout: 104 milliseconds') – MOHAMED RIFAD Jan 24 '19 at 08:00