Beispiel #1
0
        public void SeleniumSoftAssertIsTrueFalseConditionPageSource()
        {
            this.WebDriver.Navigate().GoToUrl(TestSiteAutomationUrl);
            this.Log = new FileLogger(string.Empty, "SeleniumSoftAssertIsTrueFalseConditionPageSource.txt", MessageType.GENERIC, true);
            SeleniumSoftAssert seleniumSoftAssert = new SeleniumSoftAssert(this.TestObject);
            string             logLocation        = ((FileLogger)this.Log).FilePath;
            string             pageSourceLocation = logLocation.Substring(0, logLocation.LastIndexOf('.')) + "_PS (1).txt";

            bool isFalse = seleniumSoftAssert.IsTrue(false, "testSoftAssert", "message");

            Assert.IsTrue(File.Exists(pageSourceLocation), "Fail to find page source");
            File.Delete(pageSourceLocation);
            File.Delete(logLocation);

            Assert.IsFalse(isFalse);
        }
Beispiel #2
0
        public void SeleniumSoftAssertIsFalseTrueConditionPageSource()
        {
            // Make sure we initialized the web driver
            Assert.IsNotNull(this.WebDriver);

            SeleniumSoftAssert seleniumSoftAssert = new SeleniumSoftAssert(this.TestObject);
            string             logLocation        = ((FileLogger)this.Log).FilePath;
            string             pageSourceLocation = logLocation.Substring(0, logLocation.LastIndexOf('.')) + "_PS (1).txt";

            bool isFalse = seleniumSoftAssert.IsFalse(true, "testSoftAssert", "message");

            Assert.IsTrue(File.Exists(pageSourceLocation), "Fail to find page source");
            File.Delete(pageSourceLocation);

            Assert.IsFalse(isFalse);
        }
Beispiel #3
0
        public void SeleniumSoftAssertIsFalseTrueCondition()
        {
            // Make sure we initialized the web driver
            Assert.IsNotNull(this.WebDriver);

            SeleniumSoftAssert seleniumSoftAssert = new SeleniumSoftAssert(TestObject);
            string             logLocation        = ((FileLogger)Log).FilePath;
            string             screenShotLocation = logLocation.Substring(0, logLocation.LastIndexOf('.')) + " testSoftAssert" + " (1).png";

            bool isFalse = seleniumSoftAssert.IsFalse(true, "testSoftAssert", "message");

            Assert.IsTrue(File.Exists(screenShotLocation), "Fail to find screenshot");
            File.Delete(screenShotLocation);

            Assert.IsFalse(isFalse);
        }