Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

touchPerform not working #1463

Closed
talarari opened this issue Jul 17, 2016 · 6 comments
Closed

touchPerform not working #1463

talarari opened this issue Jul 17, 2016 · 6 comments

Comments

@talarari
Copy link

copied from docs:

client.touchPerform({
                action: 'press',
                type: {
                    x: 100,
                    y: 250
                }
            });

getting
An unknown server-side error occurred while processing the command. Original error: [object Object] is not iterable!

tried :

client.touchPerform([{
                action: 'press',
                type: {
                    x: 100,
                    y: 250
                }
            }]);

getting :
An unknown server-side error occurred while processing the command. Original err
or: Cannot set property 'offset' of undefined

@christian-bromann
Copy link
Member

We are planning to build a better API around touch events. Can't say anything yet about release dates tho.

@talarari
Copy link
Author

i figured this out, the docs are wrong.
if you do this, it works:

 client.touchPerform([{
                        action: 'press',
                        options: {
                            x: 0,
                            y: 0
                        }
                    },{
                        action: 'moveTo',
                        options: {
                            x: 0,
                            y: 200
                        }
                    },{
                        action: 'release'
                    }]);

@christian-bromann
Copy link
Member

Fixed docs. Thanks!

christian-bromann added a commit that referenced this issue Aug 25, 2016
Update touchPerform example. fixes #1463
@petrmiko
Copy link

petrmiko commented Sep 14, 2016

Hi, have anyone encountered following issue with touchPerform?
Method has not yet been implemented Error: Method has not yet been implemented at touchPerform([object Object])

I'm trying to invoke following and it results in aforementioned error:

driver.element(selector)
  .then(elementWrapper => {
      return driver.touchPerform([{
          action: 'tap',
          options: {
              el: elementWrapper.value.ELEMENT,
              x: 0,
              y: 0,
              count: 1
          }
          }]);
  });

Testing against Android with:

  • Appium: 1.5.3
  • WebdriverIO: 4.2.15

Is the method really not implemented yet (if so, it is weird that above is stated, that it works), or any idea, what am I doing wrong, please? Thanks in advance!

@christian-bromann
Copy link
Member

@petrmiko this method only works if you run native apps, not hybrid or web apps it should be a native app

@petrmiko
Copy link

@christian-bromann I see, thanks - such info might be useful in docs. Is there an alternative for hybrid/web apps for touch click (tap and long touch variant)? I ask since touchClick and touchLongClick are stated in docs as deprecated so I assume they will be removed in newer versions - moreover they work only on android, not iOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants