I want to swipe down on Android home screen to see notifications.
How can I do it.
Report.Log(ReportLevel.Info, "Touch gestures", "Swipe gesture with direction 'Down (90°)' starting from 'Center' with distance '5.0' with swipe duration'500ms' and step count '0' on item 'AndroidOS.TitleLine'.", repo.AndroidOS.TitleLineInfo, new RecordItemIndex(5));
repo.AndroidOS.TitleLine.Swipe(Location.Center, ValueConverter.ArgumentFromString<Ranorex.Core.Recorder.Touch.GestureDirection>("SwipeDirection", "Down (90°)"), ValueConverter.ArgumentFromString<Ranorex.Core.Distance>("Distance", "5.0"), ValueConverter.ArgumentFromString<Ranorex.Duration>("SwipeDuration", "500ms"), 0);
Delay.Milliseconds(500);
This does not do nothing when runned...
Swipe down on Android homescreen
Re: Swipe down on Android homescreen
Hey man
AndroidOS automation is a bit flaky... Try this:
Regards,
McTurtle
AndroidOS automation is a bit flaky... Try this:
public void swipe(int x1, int y1, int x2, int y2) { string cmdLine = string.Format("/C \"C:\\Program Files (x86)\\Ranorex\\Studio\\Bin\\RxEnv\\Android\\Tools\\adb.exe\" shell input touchscreen swipe {0} {1} {2} {3}", x1, y1, x2, y2 ); System.Diagnostics.Process process = new System.Diagnostics.Process(); System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo(); info.FileName = "cmd.exe"; info.Arguments = cmdLine; process.StartInfo = info; process.Start(); } void ITestModule.Run() { swipe(300,30,300,500); }Does it work?
Regards,
McTurtle