Exemplo n.º 1
0
        internal void Register()
        {
            //extent Reports
            //Global.Base.test = Global.Base.extent.StartTest("Login Test");
            //Base.ExtentReports();

            //Click on Join button
            Join.Click();

            //Enter Firstname
            Firstname.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Firstname"));

            //Enter Lastname
            Lastname.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Lastname"));

            //Enter Email
            Email.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Email"));

            //Enter Password
            Password.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Password"));

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "ConfirmPswd"));

            //Click on Checkbox
            Checkbox.Click();

            //Click on join button to Sign Up
            JoinBtn.Click();
        }
Exemplo n.º 2
0
        internal void ProfileAdd()
        {
            // Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ProfilePage");

            GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("(//i[@class='dropdown icon'])[2]"));
            //Click Profilename
            ProfileName.Click();

            //Enter Firstname
            Firstname.Clear();
            Firstname.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Firstname"));

            //Enter Lastname
            Lastname.Clear();
            Lastname.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Lastname"));

            //Save profilename
            SaveProfileName.Click();
            var fname = GlobalDefinitions.ExcelLib.ReadData(2, "Firstname");
            var Lname = GlobalDefinitions.ExcelLib.ReadData(2, "Lastname");
            var title = fname + " " + Lname;

            GlobalDefinitions.wait(40);
            Assert.AreEqual(Titlename.Text, title);
        }
Exemplo n.º 3
0
        internal void Register()
        {
            // Populate the Excel Data
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Registration");
            Thread.Sleep(500);

            // Click the Join button on the Home page
            Join.Click();

            // Input the First name field with valid characters
            Firstname.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Firstname"));

            // Input the Last name field with valid characters
            Lastname.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Lastname"));

            // Input the Email address field with valid characters
            Emailaddress.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Emailaddress"));

            // Input the Password field with valid characters
            Password.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Password"));

            // Input the Confirm Password field with valid characters
            ConfirmPassword.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "ConfirmPassword"));

            // Click the I agree to the terms and conditions checkbox
            Checkbox.Click();

            // Click the Join button on the Registration form page
            Joinbtn.Click();
        }
Exemplo n.º 4
0
        internal void Account()
        {
            User.Click();
            MyAcc.Click();
            Namechange.Click();
            ExcelLib.PopulateInCollection(Base.ExcelPath, "MyAccount");
            Firstname.Clear();
            Thread.Sleep(3000);
            Firstname.SendKeys(ExcelLib.ReadData(2, "Firstname"));
            Driver.wait(5);
            Lastname.Clear();
            Lastname.SendKeys(ExcelLib.ReadData(2, "Lastname"));
            Submitname.Click();


            ChangeRegion.Click();
            //select a region from dropdown
            Driver.wait(5);
            SelectElement reg       = new SelectElement(Region);
            string        regionval = ExcelLib.ReadData(2, "Region");

            reg.SelectByText(regionval);
            //Region.SendKeys(ExcelLib.ReadData(2, " Region"));
            // Global.Driver.WaitForElement(Driver.driver, By.XPath("html/body/div[8]"), 10);
            // Region.SendKeys(Keys.ArrowDown);
            //Region.SendKeys(Keys.Enter);


            Thread.Sleep(3000);
            SubmitRegion.Click();
            ValidateMyAcc();
        }
Exemplo n.º 5
0
 public void EnterDetails()
 {
     WaitForElement(Email);
     Email.SendKeys("Test" + RandomString(4) + "@gmail.com");
     Username.Clear();
     Username.SendKeys("Testuser_" + RandomString(4));
     Firstname.SendKeys("bruce" + RandomString(4));
     Lastname.SendKeys("wayne" + RandomString(4));
     Company.SendKeys("SQA");
     Password.SendKeys("12345678");
 }
Exemplo n.º 6
0
        internal void Regsteps()
        {
            //Start the Add address test
            Base.test = Base.extent.StartTest("User Registration");

            //Populating the Excel sheet
            ExcelLib.PopulateInCollection(Config.Resource.ExcelPath, "Registration");
            GlobalDefinitions.wait(500);

            //Navigate to the Url
            GlobalDefinitions.driver.Navigate().GoToUrl(ExcelLib.ReadData(2, "Url"));
            GlobalDefinitions.wait(500);

            //Enter Firstname
            Firstname.SendKeys(ExcelLib.ReadData(2, "FirstName"));
            GlobalDefinitions.wait(500);

            //Enter lastname
            Lastname.SendKeys(ExcelLib.ReadData(2, "LastName"));
            GlobalDefinitions.wait(500);

            //Enter the Username
            Username.SendKeys(ExcelLib.ReadData(2, "UserName"));
            GlobalDefinitions.wait(500);

            //Enter the password
            Password.SendKeys(ExcelLib.ReadData(2, "Password"));
            GlobalDefinitions.wait(500);

            //Enter the confirm password
            ConfirmPswd.SendKeys(ExcelLib.ReadData(2, "ConfirmPswd"));
            GlobalDefinitions.wait(500);

            //Enter the Company Name
            CompanyName.SendKeys(ExcelLib.ReadData(2, "CompanyName"));
            GlobalDefinitions.wait(500);

            //Click on Create button
            Create.Click();
            GlobalDefinitions.wait(500);

            //Screenshot
            Global.SaveScreenShotClass.SaveScreenshot(GlobalDefinitions.driver, "RegistrationPage");

            //Reports
            Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Registration successfull");
        }
Exemplo n.º 7
0
        public void EnterDetails(Table table)
        {
            var email     = table.Rows[0][0];
            var username  = table.Rows[0][1];
            var firstname = table.Rows[0][2];
            var lastname  = table.Rows[0][3];
            var company   = table.Rows[0][4];
            var password  = table.Rows[0][5];

            WaitForElement(Email);
            Email.SendKeys(email + RandomString(4) + "@gmail.com");
            Username.Clear();
            Username.SendKeys(username + RandomString(4));
            Firstname.SendKeys(firstname + RandomString(4));
            Lastname.SendKeys(lastname + RandomString(4));
            Company.SendKeys(company);
            Password.SendKeys(password);
        }
Exemplo n.º 8
0
 internal void Register()
 {
     Commondriver.Excellib.PopulateInCollection(Base.Excelpath, "Signup");
     //Click on join
     Commondriver.Wait(2);
     Jointab.Click();
     //Enter firstname
     Firstname.SendKeys(Commondriver.Excellib.ReadData(2, "Frist Name"));
     //Enter lastname
     Lastname.SendKeys(Commondriver.Excellib.ReadData(2, "Last name"));
     //Enter email
     Email.SendKeys(Commondriver.Excellib.ReadData(2, "Email"));
     //Enter password
     Password.SendKeys(Commondriver.Excellib.ReadData(2, "Password"));
     //Confirm password
     Confirm.SendKeys(Commondriver.Excellib.ReadData(2, "Confirm password"));
     //Click on terms checkbox
     Terms.Click();
     //click on join
     Join.Click();
 }