You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In android testing I get error "[AndroidDriver] Error: unknown action longpress" while trying to call
var pressAndHold = new TouchAction(driver);
pressAndHold.LongPress(500,700).Perfom();
Solved the issue by reflection change action "longpress" to "longPress" this way
var pressAndHold = new TouchAction(driver);
var action = pressAndHold.LongPress(500,700);
//SUPER DIRTY HACK
var stepsField = pressAndHold.GetType()
.GetField("steps", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
var field = (stepsField.GetValue(pressAndHold) as IEnumerable<object>).ElementAt(0);
var dic = field.GetType()
.GetField("parameters", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)
.GetValue(field) as IDictionary;
dic["action"] = "longPress";
So I guess you need to change "longpress" to "longPress" in the TouchAction class
Description
In android testing I get error "[AndroidDriver] Error: unknown action longpress" while trying to call
Solved the issue by reflection change action "longpress" to "longPress" this way
So I guess you need to change "longpress" to "longPress" in the TouchAction class
Environment
Link to Appium logs
https://gist.github.com/shumantt/a1e1f4c8e92313d9b7b433ed3367e38b
The text was updated successfully, but these errors were encountered: