-
-
Notifications
You must be signed in to change notification settings - Fork 768
Description
I am getting the same casting error when I use WindowsElement.
The error is: org.openqa.selenium.remote.RemoteWebElement cannot be cast to UI.appium.java_client.windows.WindowsElement.
What do I need to do to solve this? need help.
Here is an example of my code:
///This is in my WindowsDriverBaseClase
protected WindowsDriver driver;
public class WindowsDriver {
try {
DesiredCapabilities appCapabilities = new DesiredCapabilities();
appCapabilities.setCapability("platformName", "Windows");
appCapabilities.setCapability("automationName", "Appium");
appCapabilities.setCapability("app", "C:\ProgramData\..\");
driver = new WindowsDriver(new URL("http://127.0.0.1:4723"), appCapabilities);
} catch (Exception e) {
e.printStackTrace();
}
}
//page object model
WindowsElement txbx_user = (WindowsElement) driver.findElementByAccessibilityId("13");
public void setUser() {
txbx_user.sendKeys("testing");
}