Skip to content
2 changes: 1 addition & 1 deletion src/Appium.Net/Appium/MultiAction/TouchAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ private string GetIdForElement(IWebElement el)
{
WebElement WebElement = el as WebElement;
if (WebElement != null)
return (string) typeof(OpenQA.Selenium.WebElement).GetProperty("Id",
return (string)typeof(WebElement).GetProperty("Id",
BindingFlags.NonPublic |
BindingFlags.Instance).GetValue(el, null);

Expand Down
13 changes: 11 additions & 2 deletions test/integration/Android/TouchActionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public void SimpleTouchActionTestCase()
var number1 = els.Count;

var tap = new TouchAction(_driver);
tap.Tap(els[4], 10, 5, 2).Perform();
tap.Tap(els[4], 8, 5, 2);
tap.Perform();

els = _driver.FindElements(MobileBy.ClassName("android.widget.TextView"));

Expand All @@ -65,6 +66,10 @@ public void SimpleTouchActionTestCase()
[Test]
public void ComplexTouchActionTestCase()
{
AppiumElement ViewsElem = _driver.FindElement(MobileBy.AccessibilityId("Views"));
var tap = new TouchAction(_driver);
tap.Tap(ViewsElem).Wait(200);
tap.Perform();
IList<AppiumElement> els = _driver.FindElements(MobileBy.ClassName("android.widget.TextView"));
var loc1 = els[7].Location;
var target = els[1];
Expand All @@ -78,8 +83,12 @@ public void ComplexTouchActionTestCase()
[Test]
public void SingleMultiActionTestCase()
{
AppiumElement ViewsElem = _driver.FindElement(MobileBy.AccessibilityId("Views"));
var tap = new TouchAction(_driver);
tap.Tap(ViewsElem).Wait(200);
tap.Perform();
IList<AppiumElement> els = _driver.FindElements(MobileBy.ClassName("android.widget.TextView"));
var loc1 = els[7].Location;
var loc1 = els[8].Location;
var target = els[1];
var loc2 = target.Location;

Expand Down