question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DownEvent is not defined when creating a multi-touch event

See original GitHub issue

Describe the bug I am trying to use long press gestures in my testing cases but it says that downevent is not defined. Even though I am following the playground example and importing all dependancies, it still gives me an error.

I want to tap at one point, swipe down, then contiune to hold that swipe for 3 seconds and then let go. Is there another way of achieving this? Thanks.

The stack trace

Traceback (most recent call last):
  File "airtest/cli/runner.py", line 65, in runTest
  File "six.py", line 686, in reraise
  File "airtest/cli/runner.py", line 61, in runTest
  File "/home/munib/Desktop/Airtest/Android.air/fb.py", line 89, in <module>
    DownEvent((100, 100), 0),
NameError: name 'DownEvent' is not defined

To Reproduce Steps to reproduce the behavior: Try to run this code https://github.com/AirtestProject/Airtest/blob/master/playground/android_motionevents.py

Expected behavior I should be able to mimic continuous swipe

python version: python3.6.5

airtest version: 1.1.3

Smartphone (please complete the following information):

  • Device: Google Pixel 3

  • OS: Latest Android

  • Samsung Galaxy S5

  • Last supported OS

  • Galaxy Tab

  • Latest OS supported

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
yimeliacommented, May 22, 2020

this url may help you: https://airtest.doc.io.netease.com/en/tutorial/0_automated_testing/ We are still working on the English version, so we haven’t put it to the index page

1reaction
yimeliacommented, May 18, 2020

sorry, it’s a bug caused by us, modify the from airtest.core.android.minitouch import * to

from airtest.core.android.base_touch import *

We will fix this problem in the next version

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multi-touch interaction - Web APIs - MDN Web Docs - Mozilla
This example demonstrates using the touchstart , touchmove , touchcancel , and touchend ) touch events for the following gestures: single touch, ...
Read more >
Click event not firing on touchscreen when finger moves a bit
My client has problem that they are moving finger too much and it is too hard to get click event. Is it possible...
Read more >
QTouchEvent Class | Qt GUI 6.4.1
Touch events occur when pressing, releasing, or moving one or more touch points on a touch device (such as a touch-screen or track-pad)....
Read more >
jQMultiTouch - Michael Nebeling
and processing touch event data based on an extensible set of ... put is promising as it means that multi-touch support will no....
Read more >
Learn JavaScript Touch Events In 17 Minutes - YouTube
Mobile responsive design is something everyone focuses on with CSS, but touch events are something almost no one takes the time to implement ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found