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

bug: driver.swipe() argument "duration" not working in iOS #910

Open
3 tasks done
Ryaningli opened this issue Sep 8, 2023 · 1 comment
Open
3 tasks done

bug: driver.swipe() argument "duration" not working in iOS #910

Ryaningli opened this issue Sep 8, 2023 · 1 comment
Labels

Comments

@Ryaningli
Copy link

Do I have the most recent component updates?

  • I use the most recent available driver/plugin and server versions

Is the component officially supported by the Appium team?

  • I have verified the component repository is present under the Appium organization in GitHub

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When I execute driver.swipe with duration=5, it should swipe slowly for 5 seconds, but it ended immediately, didn't last 5 seconds slowly.

Expected Behavior

Swipe slowly in 5 seconds.

Minimal Reproducible Example

from appium import webdriver
import time


caps = {
    'platformName': 'IOS',
    'app': 'xxx',
    'udid': 'xxx',
    'automationName': 'XCUITest',
    'noReset': True
    }

url = 'http://localhost:4723'
driver = webdriver.Remote('http://localhost:4723', caps)
start = time.time()
driver.swipe(36, 320, 36, 320 - 41, duration=5)
print(time.time() - start)    # << 5s

### Environment

- Operating system: macOS Ventura 13.3.1 (a)
- Appium server version (output of `appium --version`): 2.1.3
- Appium driver(s) and their version(s): xcuitest@4.35.0 [installed (npm)]
- Appium plugin(s) and their version(s): 
- Node.js version (output of `node --version`): v18.16.0
- `npm` version (output of `npm --version`): 9.5.1
- Last component(s) version which did _not_ exhibit the problem:
- Platform and version under test: iPhone 11 / iOS 16.3.1
- Real device or emulator/simulator: Real device


### Link to Appium Logs

_No response_

### Further Information

_No response_
@Ryaningli Ryaningli added the bug label Sep 8, 2023
@mykola-mokhnach mykola-mokhnach transferred this issue from appium/appium Sep 8, 2023
@lana-20
Copy link

lana-20 commented Apr 15, 2024

This can be closed as 'not a bug'. Duration should equal millisecs not secs. 5 secs would need duration=500.

Expected Behavior
Swipe slowly in 5 seconds.

The reporter's code sample generates the following result: Swipe quickly in 5 milliseconds.

Sources:

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

No branches or pull requests

2 participants