public void TestShouldSendKetsToInputs() { IOSElement textField = driver.FindElementById("TextField1"); Assert.Null(textField.GetAttribute("value")); textField.SendKeys("Hello World!"); Assert.AreEqual("Hello World!", textField.GetAttribute("value")); }
public void TestShouldCreateAndDestroyIOSSessions() { IOSElement element = driver.FindElementByClassName("XCUIElementTypeApplication"); String application_name = element.GetAttribute("name"); Assert.AreEqual("TestApp", application_name); driver.Quit(); Assert.Throws <WebDriverException>( () => { element.GetAttribute("name"); }); }
public void SetImmediateValueTest() { IOSElement slider = driver.FindElementByClassName("UIASlider"); slider.SetImmediateValue("0%"); Assert.AreEqual("0%", slider.GetAttribute("value")); }
public void SwipeTest() { IOSElement slider = driver.FindElementByClassName("UIASlider"); Point location = slider.Location; Size size = slider.Size; driver.Swipe(location.X + size.Width / 2, location.Y + size.Height / 2, location.X - 1, location.Y + size.Height / 2, 3000); Assert.AreEqual("0%", slider.GetAttribute("value")); }
public void TestShouldClickAButtonThatOpensAnAlert() { IOSElement buttonElement = driver.FindElementByAccessibilityId("show alert"); buttonElement.Click(); String alertTitle = "Cool title"; IOSElement alertTitleElement = driver.FindElementByAccessibilityId(alertTitle); Assert.AreEqual(alertTitle, alertTitleElement.GetAttribute("name")); }
public void TouchLongClickNavigationBar() { Assert.IsNotNull(session.SessionId); GoToGitHub(); JObject requestObject = new JObject(); IOSElement addressEditBox = session.FindElementByAccessibilityId("addressEditBox"); requestObject["element"] = addressEditBox.GetAttribute("elementId"); HttpWebResponse response2 = SendTouchPost("longclick", requestObject); Assert.IsNotNull(response2); System.Threading.Thread.Sleep(1000); }