public static async void GoToPage(string url) { UserControl uc = new UserControl(); switch (url) { case "www.microsoft.com/windows/ie/default.htm": uc = new IE4Start(); break; case "www.google.com": uc = new GoogleHome(); break; case "www.google.stanford.edu": uc = new GooglePrototype(); break; default: uc = new IE4NoPage(); break; } addressbar.Text = url; uc.Dock = DockStyle.Fill; await Task.Delay(new Random().Next(500, 1500)); browsingArea.Controls.Clear(); browsingArea.Controls.Add(uc); }
public void SetUp() { Initialize(); _googleHomePage = new GoogleHome(Driver); _googleResultsPage = new GoogleSearchResults(Driver); _seleniumPage = new SeleniumPage(Driver); _googleHomePage.NavigateTo(); }
public void SampleCodedUIPassTestMethod4() { BrowserWindow browser = BrowserWindow.Launch(new System.Uri("http://www.google.com")); GoogleHome gh = new GoogleHome(browser); HtmlInputButton uIGoogleSearchButton = gh.GoogleSearchButton; Assert.AreEqual("Google Search", uIGoogleSearchButton.ValueAttribute); }
public static async void GoToPage(string url) { string newURL = url; UserControl uc = new UserControl(); switch (url) { case "www.microsoft.com/windows/ie/default.htm": uc = new IE3Start(); break; case "www.google.com": uc = new GoogleHome(); break; case "www.google.stanford.edu": uc = new GooglePrototype(); break; case "www.12padams.com": uc = new _12padams1998(); break; case "12padams.com": uc = new _12padams1998(); newURL = "www.12padams.com"; break; case "google.com": uc = new GoogleHome(); newURL = "www.google.com"; break; case "google.stanford.edu": uc = new GooglePrototype(); newURL = "www.google.stanford.edu"; break; default: uc = new IENoPage(); break; } addressbar.Text = newURL; uc.Dock = DockStyle.Fill; await Task.Delay(new Random().Next(500, 1500)); browsingArea.Controls.Clear(); browsingArea.Controls.Add(uc); if (url == "www.12padams.com") { Story.Hack1.StartObjective(); } }
public void SampleCodedUIPassTestMethod() { BrowserWindow browser = BrowserWindow.Launch(new System.Uri("http://www.google.com")); GoogleHome gh = new GoogleHome(browser); HtmlInputButton uIGoogleSearchButton = gh.GoogleSearchButton; Assert.AreEqual("Google Search", uIGoogleSearchButton.ValueAttribute); // To generate code for this test, select "Generate Code for Coded UI Test" from the shortcut menu and select one of the menu items. }
public static void Main() { Console.WriteLine("Hello World!"); WebActions.launchWebApp("Chrome", "http://www.google.com"); /*WebActions.Driver.FindElement(By.Name("q")).SendKeys("The name of the wind"); * Thread.Sleep(8000); * WebActions.Driver.FindElement(By.XPath("//img[@alt='Google']")).Click(); * WebActions.Driver.FindElement(By.XPath("//div[@class='FPdoLc VlcLAe']//input[@name='btnK']")).Click(); * Console.Read();*/ GoogleHome googleHome = new GoogleHome(); PageFactory.InitElements(WebActions.Driver, googleHome); googleHome.search("The name of the wind"); //PageFactory.InitElements(webActions.Driver, googleHome); Console.Read(); WebActions.closeWebApp(); //GoogleHome googleHome = PageFactory.initElements }
public AvivaTestSteps() { googlePage = unityContainer.Resolve <GoogleHome>(); }
public void BeforeEachTest() { googleHome = new GoogleHome(); googleResults = new GoogleResults(); seleniumPage = new SeleniumPage(); }