// Implement this method public void Execute(Arguments arguments) { arguments.Search.Value = "/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.support.v4.widget.DrawerLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[2]/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.ViewAnimator/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.EditText"; arguments.By.Value = "xpath"; ElementHelper.GetElement(arguments.By.Value, arguments.Search.Value).Click(); arguments.Search.Value = "/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.support.v4.widget.DrawerLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[2]/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.ViewAnimator/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.EditText"; arguments.By.Value = "xpath"; ElementHelper.GetElement(arguments.By.Value, arguments.Search.Value).SendKeys(arguments.product.Value); var driver = AmazonAndroidOpenCommand.GetDriver(); driver.PressKeyCode(keyCode: 66, metastate: -1); }
// Implement this method public void Execute(Arguments arguments) { arguments.Search.Value = "/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.support.v4.widget.DrawerLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[2]/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.RelativeLayout/android.widget.LinearLayout[2]/android.widget.FrameLayout"; arguments.By.Value = "xpath"; ElementHelper.GetElement(arguments.By.Value, arguments.Search.Value).Click(); }
// Implement this method public void Execute(Arguments arguments) { arguments.Search.Value = "//android.widget.ImageView[@content-desc='Home']"; arguments.By.Value = "xpath"; ElementHelper.GetElement(arguments.By.Value, arguments.Search.Value).Click(); arguments.Search.Value = "//android.widget.ImageView[@content-desc='Navigation panel, button, double tap to open side panel']"; arguments.By.Value = "xpath"; ElementHelper.GetElement(arguments.By.Value, arguments.Search.Value).Click(); if (arguments.Option.Value == "home") { arguments.Search.Value = "/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.support.v4.widget.DrawerLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.ListView/android.widget.LinearLayout[1]"; arguments.By.Value = "xpath"; ElementHelper.GetElement(arguments.By.Value, arguments.Search.Value).Click(); } else if (arguments.Option.Value == "yourorders") { arguments.Search.Value = "/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.support.v4.widget.DrawerLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.ListView/android.widget.LinearLayout[4]"; arguments.By.Value = "xpath"; ElementHelper.GetElement(arguments.By.Value, arguments.Search.Value).Click(); } else if (arguments.Option.Value == "buyagain") { arguments.Search.Value = "/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.support.v4.widget.DrawerLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.ListView/android.widget.LinearLayout[5]"; arguments.By.Value = "xpath"; ElementHelper.GetElement(arguments.By.Value, arguments.Search.Value).Click(); } else if (arguments.Option.Value == "yourwishlist") { arguments.Search.Value = "/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.support.v4.widget.DrawerLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.ListView/android.widget.LinearLayout[6]"; arguments.By.Value = "xpath"; ElementHelper.GetElement(arguments.By.Value, arguments.Search.Value).Click(); } else if (arguments.Option.Value == "youraccount") { arguments.Search.Value = "/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.support.v4.widget.DrawerLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.ListView/android.widget.LinearLayout[7]"; arguments.By.Value = "xpath"; ElementHelper.GetElement(arguments.By.Value, arguments.Search.Value).Click(); } else if (arguments.Option.Value == "amazonpay") { arguments.Search.Value = "/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.support.v4.widget.DrawerLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.ListView/android.widget.LinearLayout[8]"; arguments.By.Value = "xpath"; ElementHelper.GetElement(arguments.By.Value, arguments.Search.Value).Click(); } else if (arguments.Option.Value == "prime") { arguments.Search.Value = "/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.support.v4.widget.DrawerLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.ListView/android.widget.LinearLayout[9]"; arguments.By.Value = "xpath"; ElementHelper.GetElement(arguments.By.Value, arguments.Search.Value).Click(); } else if (arguments.Option.Value == "sellonamazon") { arguments.Search.Value = "/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.support.v4.widget.DrawerLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.ListView/android.widget.LinearLayout[10]"; arguments.By.Value = "xpath"; ElementHelper.GetElement(arguments.By.Value, arguments.Search.Value).Click(); } else if (arguments.Option.Value == "programsandfeatures") { arguments.Search.Value = "/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.support.v4.widget.DrawerLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.ListView/android.widget.LinearLayout[11]"; arguments.By.Value = "xpath"; ElementHelper.GetElement(arguments.By.Value, arguments.Search.Value).Click(); } else if (arguments.Option.Value == "funzone") { arguments.Search.Value = "/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.support.v4.widget.DrawerLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.ListView/android.widget.LinearLayout[12]"; arguments.By.Value = "xpath"; ElementHelper.GetElement(arguments.By.Value, arguments.Search.Value).Click(); } }