When trying to pass in a web element to long_press() I am getting the following error as though my web element is being converted into a float and the function is expecting an integer.
I can use coordinates without errors, but I want to pass a web element instead.
> raise exception_class(message, screen, stacktrace)
E selenium.common.exceptions.InvalidArgumentException: Message: com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: Expected an int but was 377.5 at line 1 column 44 path $.params.y
My simplistic code:
def dismiss_alert(self, loc):
el = self.wait_for_visibility_of_element(loc)
TouchAction(self.driver).long_press(el, duration=5).release().perform()
self.find_element(self.DISMISS_ALERT).click()
self.find_element(self.DISMISS_ALERT_CONFIRM).click()
error.txt (7.0 KB)