public void OnSubmit() { DemoMainPageService.ClickOnDemo(); PersonalityTestPageService.SetFullName("Shreya Shrestha"); PersonalityTestPageService.SelectGender(); PersonalityTestPageService.SetEmail("*****@*****.**"); PersonalityTestPageService.SetPassword("jakdjflkajfdk"); PersonalityTestPageService.SetCity("Kathmandu"); PersonalityTestPageService.SetState("Nepalmandal"); PersonalityTestPageService.SetZipCode("00977"); PersonalityTestPageService.SetContactNo("9849310444"); PersonalityTestPageService.SetIntroduction(SiteDriver.ReplicateString("intro ")); PersonalityTestPageService.SetHobbies(SiteDriver.ReplicateString("replicate")); PersonalityTestPageService.ClickFavFood(); PersonalityTestPageService.SelectSkills("Coding"); PersonalityTestPageService.SelectCountry("Switzerland"); PersonalityTestPageService.SelectFavItem(); string curUrl = SiteDriver.GetCurrentUrl(); PersonalityTestPageService.ClickSubmitButton(); string nextpage = SiteDriver.GetCurrentUrl(); Assert.True(curUrl != nextpage); }
public void ClickOnDemo() { string prevUrl = SiteDriver.GetCurrentUrl(); DemoMainPageService.ClickOnDemo(); string currUrl = SiteDriver.GetCurrentUrl(); Assert.True(prevUrl != currUrl); }
public void NoFillSubmit() { DemoMainPageService.ClickOnDemo(); string curUrl = SiteDriver.GetCurrentUrl(); PersonalityTestPageService.ClickSubmitButton(); string nexturl = SiteDriver.GetCurrentUrl(); Assert.True(curUrl != nexturl); }
public void OnReset() { DemoMainPageService.ClickOnDemo(); string curUrl = SiteDriver.GetCurrentUrl(); PersonalityTestPageService.SetFullName("Shreya Shrestha"); PersonalityTestPageService.SelectGender(); PersonalityTestPageService.SetEmail("*****@*****.**"); PersonalityTestPageService.SetPassword("jakdjflkajfdk"); PersonalityTestPageService.SetCity("Kathmandu"); PersonalityTestPageService.ClickResetButton(); string diffUrl = SiteDriver.GetCurrentUrl(); Assert.True(curUrl == diffUrl); }
public MainProgram(IWebDriver webDriver) : base(webDriver) { string prevUrl = SiteDriver.GetCurrentUrl(); DemoMainPageService.ClickOnDemo(); string currUrl = SiteDriver.GetCurrentUrl(); verifyDiffUrl(prevUrl, currUrl); PersonalityTestPageService.SetFullName("Shreya Shrestha"); PersonalityTestPageService.SelectGender(); PersonalityTestPageService.SetEmail("*****@*****.**"); PersonalityTestPageService.SetPassword("jakdjflkajfdk"); PersonalityTestPageService.SetCity("Kathmandu"); PersonalityTestPageService.SetState("Nepalmandal"); PersonalityTestPageService.SetZipCode("00977"); PersonalityTestPageService.SetContactNo("9849310444"); PersonalityTestPageService.SetIntroduction(SiteDriver.ReplicateString("intro ")); PersonalityTestPageService.SetHobbies(SiteDriver.ReplicateString("hobbies ")); PersonalityTestPageService.ClickFavFood(); PersonalityTestPageService.SelectSkills("Coding"); PersonalityTestPageService.SelectCountry("Switzerland"); PersonalityTestPageService.SelectFavItem(); prevUrl = currUrl; PersonalityTestPageService.ClickSubmitButton(); //bool moveahead = false; //try //{ // List<IWebElement> elements = SiteDriver.FindElements("input:invalid", "CSSSelector"); // foreach(IWebElement e in elements) // { // Console.WriteLine(e.) // } //} //catch(NoSuchElementException e) //{ // moveahead = true; //} currUrl = SiteDriver.GetCurrentUrl(); verifyDiffUrl(prevUrl, currUrl); SiteDriver.closeDriver(); }