Hello.
I am just start work with appium, and i have some problem
( starting android automation tests)
With annotation @FindBy(id = “someId”) works correctly only for element displayed on the screen.
I tried to fix it with
JavascriptExecutor js = (JavascriptExecutor) driver;
HashMap scrollObjects = new HashMap();
scrollObjects.put(“direction”, “down”);
scrollObjects.put(“element”,
((RemoteWebElement) someId).getId());
js.executeScript(“mobile: scrollTo”, scrollObjects);
Error:
java.lang.ClassCastException: com.sun.proxy.$Proxy11 cannot be cast to
org.openqa.selenium.remote.RemoteWebElement
Tried something like that
touchAction.moveTo(someId);
Error:
java.lang.NullPointerException
Can someone help?
I initializad elements with PageFactory.initElements(driver, this);