The constructor TouchAction(AndroidDriver) is undefined
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.3k
- Forks
- 752
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 8
Description
The problem
Hey i have generated a swipe action by recording over the appium inspector.
I got the folowing code:
(new TouchAction(driver))
.press({x: 656, y: 1393})
.moveTo({x: 437: y: 619})
.release()
.perform()
In this case i got the error The constructor TouchAction(AndroidDriver) is undefined
I also tried
TouchAction ta = new TouchAction(driver);
PointOption poStart = new PointOption();
PointOption poEnd = new PointOption();
poStart.point(656, 1393);
poEnd.point(437, 619);
ta.press(poStart).moveTo(poEnd).release().perform();
In this case press, moveTo, release and release are crossed out, same with TouchAction.
At my import io.appium.java_client.TouchAction; the TouchAction is crossed out
driver is AndroidDriver.
Error Log
This is my Error log by trying to execute the secound code snipped
Exception in thread "main" java.lang.IllegalArgumentException: Coordinate values must be defined
at io.appium.java_client.touch.offset.PointOption.lambda$verify$0(PointOption.java:65)
at java.base/java.util.Optional.orElseThrow(Optional.java:403)
at io.appium.java_client.touch.offset.PointOption.verify(PointOption.java:65)
at io.appium.java_client.touch.ActionOptions.build(ActionOptions.java:37)
at io.appium.java_client.touch.offset.PointOption.build(PointOption.java:71)
at io.appium.java_client.TouchAction$ActionParameter.(TouchAction.java:241)
at io.appium.java_client.TouchAction.press(TouchAction.java:73)
Environment
I using the newest version of all appium products.
Android
Emulator
java-client-8.0.0
selenium-server 4.1.2
Code To Reproduce Issue [ Good To Have ]
1.Create new Java Projekt in Eclipse add the libs for selenium-server-4.1.2, common-lang.3.1.1.2 and java-client 8.0.0
2. try to add one of the code snippets above
-> Code is marked with red and give the error message.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported java-client 8.0.0 entry points in io.appium.java_client.TouchAction and io.appium.java_client.touch.offset.PointOption, then reproduce the snippets against Selenium 4.1.2. Compare the constructor and coordinate-building errors with the current API; done means the reported code either works or the issue is documented as an unsupported usage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- mobile-dev, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100