public static ElementWrapper UploadFile(this ElementWrapper element, string fullFileName) { if (element.BrowserWrapper.IsDotvvmPage()) { SeleniumTestBase.Log("Selenium.DotVVM : Uploading file", 10); var name = element.GetTagName(); if (name == "a" && element.HasAttribute("onclick") && (element.GetAttribute("onclick")?.Contains("showUploadDialog") ?? false)) { return(UploadFileByA(element, fullFileName)); } if (name == "div" && element.FindElements("iframe", SelectBy.CssSelector).Count == 1) { return(UploadFileByDiv(element, fullFileName)); } else { SeleniumTestBase.Log("Selenium.DotVVM : Cannot identify DotVVM scenario. Uploading over standard procedure.", 10); element.BrowserWrapper.FileUploadDialogSelect(element, fullFileName); return(element); } } element.BrowserWrapper.FileUploadDialogSelect(element, fullFileName); return(element); }
public HomePage(SeleniumTestBase automationBase) : base(automationBase) { }
public TestContextLogger(SeleniumTestBase test) { TestBase = test; }
public Phone(SeleniumTestBase testBase) : base(testBase) { }
public CheckOut(SeleniumTestBase testBase) : base(testBase) { }
public static By SelectByDataUi(this SeleniumTestBase testBase, string selector) => By.CssSelector($"[data-ui='{selector}']");