I am trying to insert a code that pressed and held my button down. This is the code I have right now but I am having a error in my code.
WebElement redButtonElement = driver.findElementByAccessibilityId(redButton);
TouchActions action = new TouchActions(driver);
My error is with “redButtonElement” and the error says
Java: incompatible types: org.openqa.selenium.WebElement cannot be converted to java.lang.String
Any other solutions for me to try?