Пример #1
0
        public void SeleniumSoftAssertIsFalseTrueConditionPageSourceNoBrowser()
        {
            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), "Should not have captured page source");
            Assert.IsFalse(isFalse);
        }
Пример #2
0
        public void SeleniumSoftAssertIsFalseTrueConditionNoBrowser()
        {
            SeleniumSoftAssert seleniumSoftAssert = new SeleniumSoftAssert(this.TestObject);
            string             logLocation        = ((FileLogger)this.Log).FilePath;
            string             screenShotLocation = logLocation.Substring(0, logLocation.LastIndexOf('.')) + " testSoftAssert" + " (1).Jpeg";

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

            Assert.IsFalse(File.Exists(screenShotLocation), "Should not have taken screenshot");
            Assert.IsFalse(isFalse);
        }
Пример #3
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);
        }
Пример #4
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);
        }