public override void Run(RemoteWebDriver driver, string browser, CredentialManager credentialManager, ResponsivenessTimer timer) { // Start local web server Task <string> webSrvTask = WebSrv.StartWebSrv(DefaultDuration, GetWebRootPath()); // Nagivate to static resource var staticUrl = GetStaticResourceUrl(); driver.NavigateToUrl(staticUrl + "?redirectTo=https://ya.ru/"); driver.Wait(10); driver.CreateNewTab(); driver.Wait(1); driver.NavigateToUrl(staticUrl + "?redirectTo=https://google.ru/"); driver.Wait(14); driver.CreateNewTab(); driver.Wait(1); driver.NavigateToUrl(staticUrl + "?redirectTo=https://amazon.com/"); driver.Wait(14); driver.CreateNewTab(); driver.Wait(1); driver.NavigateToUrl(staticUrl + "?redirectTo=https://youtube.com/"); driver.Wait(14); WebSrv.StopWebSrv(Name); }
public override void Run(RemoteWebDriver driver, string browser, CredentialManager credentialManager, ResponsivenessTimer timer) { // Start local web server Task <string> webSrvTask = WebSrv.StartWebSrv(DefaultDuration, GetWebRootPath()); // Nagivate to local static resource driver.NavigateToUrl(GetStaticWebUrl()); driver.Wait(2); driver.CreateNewTab(); driver.Wait(1); // Open second tab with local resource driver.NavigateToUrl(GetStaticWebUrl()); driver.Wait(2); driver.CreateNewTab(); driver.Wait(1); // Open second tab with local resource driver.NavigateToUrl(GetStaticWebUrl()); driver.Wait(2); driver.CreateNewTab(); driver.Wait(1); driver.NavigateToUrl(GetStaticWebUrl("empty.html")); WebSrv.StopWebSrv(Name); }
public override void SetUp(RemoteWebDriver driver) { // Start local web server Task <string> webSrvTask = WebSrv.StartWebSrv(DefaultDuration, GetWebRootPath()); // Nagivate to local static resource driver.NavigateToUrl(GetStaticResourceUrl()); driver.Wait(2); driver.LeftClick(391, 101); driver.CursorPos(390, 100); driver.Wait(1); driver.CursorPos(391, 101); driver.Wait(2); driver.CursorPos(390, 100); driver.Wait(1); driver.CursorPos(391, 101); driver.Wait(1); driver.LeftClick(390, 100); // for Yabro driver.LeftClick(400, 110); // for Opera driver.Wait(2); driver.CreateNewTab(); driver.Wait(2); driver.NavigateToUrl(GetStaticResourceUrl() + "/scroll.html"); driver.Wait(2); }
public override void Run(RemoteWebDriver driver, string browser, CredentialManager credentialManager, ResponsivenessTimer timer) { // Start local web server Task <string> webSrvTask = WebSrv.StartWebSrv(DefaultDuration, GetWebRootPath()); // Nagivate to local static resource driver.NavigateToUrl(GetStaticResourceUrl()); }
public override void SetUp(RemoteWebDriver driver) { // Stop replay server if it still runned from another scenario WebPageReplay.StopWebSrv(Name); driver.Wait(5); // Start local web server for slow reload Task <string> webSrvTask = WebSrv.StartWebSrv(0, GetWebRootPath(), httpPort, httpPortTls); // Start replay server Task <string> wprSrvTask = WebPageReplay.StartWebPageReplay(GetWebPageReplayRecordPath()); }
public override void Run(RemoteWebDriver driver, string browser, CredentialManager credentialManager, ResponsivenessTimer timer) { // Start local web server Task <string> webSrvTask = WebSrv.StartWebSrv(DefaultDuration, GetWebRootPath()); // Nagivate to local static resource driver.NavigateToUrl(GetStaticResourceUrl()); driver.Wait(5); // Launch live modal var liveModalLaunchButton = driver.FindElementById("live-example-modal-launch"); //liveModalActions.MoveToElement(liveModalLaunchButton); driver.ExecuteScript("arguments[0].scrollIntoView(true);", liveModalLaunchButton); driver.Wait(5); driver.ClickElement(liveModalLaunchButton); driver.Wait(5); // Close live modal var liveModalCloseButton = driver.FindElementById("live-example-modal-close"); driver.ExecuteScript("arguments[0].scrollIntoView(true);", liveModalCloseButton); driver.Wait(5); driver.ClickElement(liveModalCloseButton); driver.Wait(5); // Move to dropdowns var examplesDropdown = driver.FindElementById("dropdowns-examples"); //dropdownsExamplesActions.MoveToElement(examplesDropdown); driver.ExecuteScript("arguments[0].scrollIntoView(true);", examplesDropdown); driver.Wait(5); // Click on dropdowns var dropdownButton = driver.FindElementById("dropdown-example-open"); driver.ExecuteScript("arguments[0].scrollIntoView(true);", dropdownButton); driver.Wait(10); driver.ClickElement(dropdownButton); driver.Wait(5); // Move to carousel var examplesCarousel = driver.FindElementById("carousel-focus-here"); driver.ExecuteScript("arguments[0].scrollIntoView(true);", dropdownButton); driver.Wait(5); WebSrv.StopWebSrv(Name); }
public override void Run(RemoteWebDriver driver, string browser, CredentialManager credentialManager, ResponsivenessTimer timer) { // Start local web server Task <string> webSrvTask = WebSrv.StartWebSrv(DefaultDuration, GetWebRootPath()); // Nagivate to static resource var staticUrl = GetStaticResourceUrl(); driver.NavigateToUrl(staticUrl); driver.Wait(5); driver.ExecuteScript("setInterval(function() { window.scrollBy({ top: 6, left: 0, behavior: \"smooth\" });}, 10);"); WebSrv.StopWebSrv(Name); }
public override void Run(RemoteWebDriver driver, string browser, CredentialManager credentialManager, ResponsivenessTimer timer) { // Start local web server Task <string> webSrvTask = WebSrv.StartWebSrv(DefaultDuration, GetWebRootPath()); for (var i = 1; i < 5; i++) { for (var n = 1; n < 6; n++) { driver.CreateNewTab(); driver.Wait(1); driver.NavigateToUrl($"http://site{n}.local:8080/index.html"); driver.Wait(9); } } Logger.LogWriteLine(webSrvTask.Result); }
public override void Run(RemoteWebDriver driver, string browser, CredentialManager credentialManager, ResponsivenessTimer timer) { var blank = "about:blank"; var sber = "https://online.sberbank.ru"; var localhost = "http://localhost:8080/CSAFront/index.do"; // Start local web server Task <string> webSrvTask = WebSrv.StartProxy(DefaultDuration, sber); for (var i = 0; i < 5; i++) { driver.NavigateToUrl(blank); driver.Wait(1); driver.NavigateToUrl(localhost); driver.Wait(1); } Logger.LogWriteLine(webSrvTask.Result); }
public override void Run(RemoteWebDriver driver, string browser, CredentialManager credentialManager, ResponsivenessTimer timer) { // Start local web server string cwd = System.IO.Directory.GetCurrentDirectory(); string webRootPath = System.IO.Path.Combine(cwd, "StaticResources", Name, "websrv.exe"); Task <string> webSrvTask = WebSrv.StartWebSrv(DefaultDuration, webRootPath); // Nagivate to static resource var staticYaRu = GetStaticResourceUrl(); driver.NavigateToUrl(staticYaRu); for (var i = 0; i < 2; i++) { driver.Wait(1); driver.NavigateToUrl(staticYaRu); } WebSrv.StopWebSrv(Name); }
public override void Run(RemoteWebDriver driver, string browser, CredentialManager credentialManager, ResponsivenessTimer timer) { // Start local web server Task <string> webSrvTask = WebSrv.StartWebSrv(DefaultDuration, GetWebRootPath()); // Nagivate to static resource var staticUrl = GetStaticResourceUrl(); driver.NavigateToUrl(staticUrl); for (var i = 0; i < 10; i++) { driver.NavigateToUrl(staticUrl); driver.Wait(1); driver.FindElementById("newwindow").Click(); driver.Wait(1); } Logger.LogWriteLine(webSrvTask.Result); }
public override void Run(RemoteWebDriver driver, string browser, CredentialManager credentialManager, ResponsivenessTimer timer) { // Start local web server Task <string> webSrvTask = WebSrv.StartWebSrv(DefaultDuration, GetWebRootPath()); // Nagivate to static resource var staticUrl = GetStaticResourceUrl(); driver.NavigateToUrl(staticUrl); var emptyA = driver.FindElementById("anchor-empty"); var a1 = driver.FindElementById("anchor1"); var a2 = driver.FindElementById("anchor2"); for (int i = 0; i <= 10; i++) { var emptyActions1 = new OpenQA.Selenium.Interactions.Actions(driver); emptyActions1.MoveToElement(emptyA).Build().Perform(); driver.Wait(2); var a1Actions = new OpenQA.Selenium.Interactions.Actions(driver); a1Actions.MoveToElement(a1).Build().Perform(); driver.Wait(3); var emptyActions2 = new OpenQA.Selenium.Interactions.Actions(driver); emptyActions2.MoveToElement(emptyA).Build().Perform(); driver.Wait(2); var a2Actions = new OpenQA.Selenium.Interactions.Actions(driver); a2Actions.MoveToElement(a2).Build().Perform(); driver.Wait(3); } var emptyActionsEnd = new OpenQA.Selenium.Interactions.Actions(driver); emptyActionsEnd.MoveToElement(emptyA).Build().Perform(); WebSrv.StopWebSrv(Name); }
public override void SetUp(RemoteWebDriver driver) { // Start local web server Task <string> webSrvTask = WebSrv.StartWebSrv(0, GetWebRootPath(), httpPort, httpPortTls); // Navigate driver.NavigateToUrl(GetStaticResourceUrl()); driver.Wait(2); driver.CreateNewTab(); driver.Wait(1); driver.NavigateToUrl(GetStaticResourceUrl()); driver.Wait(2); driver.CreateNewTab(); driver.Wait(1); driver.NavigateToUrl(GetStaticResourceUrl()); driver.Wait(2); driver.CreateNewTab(); driver.Wait(1); driver.NavigateToUrl("about:blank"); driver.Wait(2); }
public override void SetUp(RemoteWebDriver driver) { // Start local web server Task <string> webSrvTask = WebSrv.StartWebSrv(DefaultDuration, GetWebRootPath(), "TLS_RSA_WITH_AES_128_CBC_SHA"); }
public override void TearDown(RemoteWebDriver driver) { WebSrv.StopWebSrv(Name); }
public override void SetUp(RemoteWebDriver driver) { // Start local web server Task <string> webSrvTask = WebSrv.StartWebSrv(DefaultDuration, GetWebRootPath()); }
public override void TearDown(RemoteWebDriver driver) { // Stop web server WebSrv.StopWebSrv(Name); }