public void TestCase3() { SeleniumLog log = SeleniumLog.Instance(); log.Path("Test Case 3"); SelectFlight( FROM: "Paris", TO: "London", FLIGHTNUM: 711 ); }
public void TestCase1() { SeleniumLog log = SeleniumLog.Instance(); log.Path("Test Case 1"); SelectFlight( FROM: "Boston", TO: "Rome", FLIGHTNUM: 622 ); }
public void TestCase2() { SeleniumLog log = SeleniumLog.Instance(); log.Path("Test Case 2"); SelectFlight( FROM: "Paris", TO: "Berlin", FLIGHTNUM: 15 ); }
public void Test1() { SeleniumLog log = SeleniumLog.Instance(); float test = 3.2f; //Check if it matches any of the numbers try { log.Path("AreEual"); slAssert.ResetResult(); slAssert.AreEqual(1.0f, 1.5f, 0.0f); slAssert.AreEqual(1.1f, 3.5f, 0.0f); slAssert.AreEqual(3.0f, 2.5f, 1.0f); slAssert.AreEqual(1.0f, 1.5f, 0.7f); slAssert.AreEqual(1.0f, 1.5f, 0.0f); slAssert.PublishResult(); //You can choose when to evaluate the test and exit the test, so all comparisons above will be made and logged. log.Pass("AreEqual test cases passed"); } catch (Exception e) { log.Fail("Are equal test cases failed"); } try { log.Path("AreNotEual"); slAssert.ResetResult(); slAssert.AreNotEqual(1.0f, 1.5f, 0.0f); slAssert.AreNotEqual(1.1f, 3.5f, 0.0f); slAssert.AreNotEqual(3.0f, 2.5f, 1.0f); slAssert.AreNotEqual(1.0f, 1.5f, 0.7f); slAssert.AreNotEqual(1.0f, 1.5f, 0.0f); slAssert.PublishResult(); //You can choose when to evaluate the test and exit the test, so all comparisons above will be made and logged. log.Pass("AreNotEqual test cases passed"); } catch { log.Fail("AreNotEequal test cases failed"); } }
public void Run() { SeleniumLog log = SeleniumLog.Instance(); log.Path("TestCase 1: Site navigation"); log.WriteLine("Step 1: Goto Seleniumlog.com website"); log.Indent(); Home.Goto(); log.Unindent(); //log.WriteLine("Step 2: Goto Buy Now page"); //Home.BuyNow.Click(); log.WriteLine("Step 3: Goto Contact Us page"); Home.ContactUs.Click(); Thread.Sleep(2000); log.WriteLine("Step 4: Enter First Name"); Contact.FirstName.SendKeys("James"); log.WriteLine("Step 5: Enter Last Name"); Contact.LastName.SendKeys("Smith"); log.WriteLine("Step 6: Enter Email address"); Contact.Email.SendKeys("james.smith.seleniumlog.com"); log.WriteLine("Step 7: Enter Comments"); Contact.Comment.SendKeys("Hello World!"); log.WriteLine("Step 8: Click on Submit button"); Contact.Submit.Click(); log.WriteLine("Step 9: Verify not submitted"); log.Indent(); Contact.VerifyNotSubmitted(); log.Unindent(); log.WriteLine("Step 10: Re-Enter Email address"); Contact.Email.SendKeys("*****@*****.**"); log.WriteLine("Step 11: Click on Submit button"); Contact.Submit.Click(); log.WriteLine("Step 12: Verify submitted successfully"); log.Indent(); Contact.VerifySubmitted(); log.Unindent(); }