Skip to content

Instantly share code, notes, and snippets.

@angelovstanton
Created November 19, 2018 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angelovstanton/1edd8f4b8eee02ef10cefb16b7f6169e to your computer and use it in GitHub Desktop.
Save angelovstanton/1edd8f4b8eee02ef10cefb16b7f6169e to your computer and use it in GitHub Desktop.
[TestMethod]
public void LocatingElementInsideAnotherElementTest()
{
var mainElement = _driver.FindElementById("decor_content_parent");
var button = mainElement.FindElementById("button");
button.Click();
var checkBox = mainElement.FindElementByClassName("android.widget.CheckBox");
checkBox.Click();
var thirdButton = mainElement.FindElementByXPath("//*[@resource-id='com.example.android.apis:id/button']");
thirdButton.Click();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment