示例#1
0
        public void LoginChromeNegative()
        {
            JArray Inputvalue     = JArray.Parse(GetTestData.GetTestCaseData());
            var    Module         = Inputvalue[0]["ModuleName"].ToString();
            var    Submodule      = Inputvalue[0]["SubModuleName"].ToString();
            var    TestSuiteName  = Inputvalue[0]["TestSuiteName"].ToString();
            var    Description    = Inputvalue[0]["Description"].ToString();
            var    ExpectedResult = Inputvalue[0]["ExpectedResult"].ToString();
            var    TestCaseType   = Inputvalue[0]["TestCaseType"].ToString();
            var    members        = Inputvalue[0]["Actions"];
            var    Password       = members[0]["FieldName"].ToString();
            var    PasswordValue  = members[0]["FieldValue"].ToString();
            var    UserName       = members[1]["FieldName"].ToString();
            var    UsernameValue  = members[1]["FieldValue"].ToString();

            ActualResult = ExpectedResult;
            Browser StartBrowser = new Browser();

            browser = StartBrowser.GetBrowser("Chrome", "https://demo.vievusolution.com/");
            LoginPage login = new LoginPage(browser);

            Output = login.PerformLogin(UsernameValue, PasswordValue, ExpectedResult);
            Status = VerifyResult.Verify("", ExpectedResult, ActualResult);
            WriteTestResult.WritestResult(TestSuiteName, Module, Submodule, Description, Status[0].ToString(), ExpectedResult, Status[1].ToString(), Status[2].ToString(), "Chrome", "Desktop", TestCaseType);
        }