// This locator strategy is available in XCUITest Driver mode public static Search IosNsPredicate(string iosNsPredicate) { return(new Search { Wrapper = MobileBy.IosNSPredicate(iosNsPredicate) }); }
public void SearchParserByFunctionTest() { const string locator = "abc"; var searchParser = new SearchParser("AccessibilityID", locator); Assert.AreEqual(searchParser.By, MobileBy.AccessibilityId(locator)); searchParser = new SearchParser("classname", locator); Assert.AreEqual(searchParser.By, By.ClassName(locator)); searchParser = new SearchParser("CssSelector", locator); Assert.AreEqual(searchParser.By, By.CssSelector(locator)); searchParser = new SearchParser("id", locator); Assert.AreEqual(searchParser.By, By.Id(locator)); searchParser = new SearchParser("IOSCLASSCHAIN", locator); Assert.AreEqual(searchParser.By, MobileBy.IosClassChain(locator)); searchParser = new SearchParser("iosNSpredicate", locator); Assert.AreEqual(searchParser.By, MobileBy.IosNSPredicate(locator)); searchParser = new SearchParser("IOSUIAutomation", locator); Assert.AreEqual(searchParser.By, MobileBy.IosUIAutomation(locator)); searchParser = new SearchParser("LINKTEXT", locator); Assert.AreEqual(searchParser.By, By.LinkText(locator)); searchParser = new SearchParser("NaMe", locator); Assert.AreEqual(searchParser.By, By.Name(locator)); searchParser = new SearchParser("PartialLINKTEXT", locator); Assert.AreEqual(searchParser.By, By.PartialLinkText(locator)); searchParser = new SearchParser("Tagname", locator); Assert.AreEqual(searchParser.By, By.TagName(locator)); searchParser = new SearchParser("TizenAutomation", locator); Assert.AreEqual(searchParser.By, MobileBy.TizenAutomation(locator)); searchParser = new SearchParser("WindowsAutomation", locator); Assert.AreEqual(searchParser.By, MobileBy.WindowsAutomation(locator)); searchParser = new SearchParser("XPath", locator); Assert.AreEqual(searchParser.By, By.XPath(locator)); }
public IOSAlert() : base(MobileBy.IosNSPredicate("type == 'XCUIElementTypeAlert' AND name == 'Alert'")) { }
public IOSChooseViewScreen() : base(MobileBy.IosNSPredicate($"name == 'Choose An Awesome View'")) { }