public void KH034_KhachHang_Add(object tenKH, object gioitinhIndex, object sdt, object diachi) { button_Them.Click(); SwitchToPopupWindow(); window_Them = session.FindElementByClassName("Popup"); var textboxes = window_Them.FindElementsByTagName("Edit"); textboxes[0].SendKeys((string)tenKH); Chon_GioiTinh((int)gioitinhIndex); Thread.Sleep(100); SwitchToPopupWindow(); textboxes[2].SendKeys((string)sdt); textboxes[3].SendKeys((string)diachi); window_Them.FindElementByName("Thêm").Click(); bool isNewKhachHangExists = table_KhachHang.FindElementsByTagName("DataItem").Any(row => { var cell_Ten = row.FindElementsByClassName("DataGridCell")[1]; return(cell_Ten.Text.Equals(tenKH)); }); Assert.IsTrue(isNewKhachHangExists); }
public void KH036_NhapLaiDuLieu(object tenKH, object gioitinhIndex, object sdt, object diachi) { button_Them.Click(); SwitchToPopupWindow(); window_Them = session.FindElementByClassName("Popup"); var textboxes = window_Them.FindElementsByTagName("Edit"); textboxes[0].SendKeys((string)tenKH); Chon_GioiTinh((int)gioitinhIndex); Thread.Sleep(100); SwitchToPopupWindow(); textboxes[2].SendKeys((string)sdt); textboxes[3].SendKeys((string)diachi); window_Them.FindElementByName("Nhập lại").Click(); bool isDuLieuBiXoa = String.IsNullOrEmpty(textboxes[0].Text) && String.IsNullOrEmpty(textboxes[2].Text) && String.IsNullOrEmpty(textboxes[3].Text); Assert.IsTrue(isDuLieuBiXoa); new Actions(session).MoveByOffset(300, 0).Click().Perform(); }
public void FindElementsByTagName() { var elements = homePagePivot.FindElementsByTagName("Button"); Assert.IsNotNull(elements); Assert.AreEqual(4, elements.Count); }
public void FindElementsByTagName() { var elements = homePagePivot.FindElementsByTagName("Button"); Assert.IsNotNull(elements); // There are at least 4 buttons in Windows 10 Alarms & Clock HomePagePivot // Version 1511: 5, Version 1607: 5, Version 1703: 4 Assert.IsTrue(elements.Count >= 4); }
public override IEnumerable <AppiumWebElement> FindAllElements(WindowsElement element) { return(element.FindElementsByTagName(Value)); }