Long Press expecting a int when passing a web element

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)

Are you indicating I need install another version of Appium or UIAutomator? I am already using Appium v1.18.0-1.

Yes, the bug was fixed in [email protected]

I’m not following you, from this page, which one do I want: https://github.com/appium/appium-desktop/tags

There are none. You must install command line version from NPM and connect to it using AD

Can you be a little more specific, I’m just a lonely QA person living in a Software Engineers world.
I would really like to apply this fix I see was committed, but really don’t know what I would be installing via command line and then connecting it using AD (i’m not sure what AD is).

Those above commands did the trick. Thanks for replying.

1 Like

You can use this instruction
http://appium.io/docs/en/about-appium/getting-started/