public void loginAndLogout()
        {
            string username = "";
            string[] password = null;

            XMLParse oXMLData = new XMLParse();

            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());

            password = oXMLData.getData("settings/credentials", "AttendeePassword");

            username = loginHelper.GetFromFile("Register");

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with email address
            Login(username, password[0]);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Page title
            verifyTitle("Event List");

            //Click on user-id
            loginHelper.ClickElement("ClickId");

            //Logout from the application.
            loginHelper.ClickElement("LogOut");

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("LoginAndLogout - Attendee");
        }
        public void uploadProfilePicture()
        {
            string username = "";
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());
            profileHelper = new ProfileHelper(GetWebDriver());

            username = loginHelper.GetFromFile("Register");
            password = oXMLData.getData("settings/credentials", "AttendeePassword");

            String imagePath = GetPathtoUpload() + "//TestProfile.jpg";

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with email address
            Login(username, password[0]);
            Console.WriteLine("Logged in as: " + username + " / " + password[0]);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Page title
            verifyTitle("Event List");

            //Click on user-id
            loginHelper.ClickElement("ClickId");

            //Click on my Profile
            profileHelper.ClickElement("MyProfile");

            //wait for text
            profileHelper.WaitForTextInPage("User Bio", 20);

            //Click on Change Avatar
            profileHelper.ClickElement("Avtar");

            //wait for text
            profileHelper.WaitForTextInPage("New Avatar",30);

            //Upload Image
            profileHelper.uploadImage("UploadImage", imagePath);

            //Click on save button.
            profileHelper.performClick("SaveImage");

            //Wait for text
            profileHelper.WaitForTextInPage("Your Avatar is being saved", 30);

            //wait for text
            profileHelper.WaitForTextInPage("User Bio", 20);

            loginHelper.WaitForElementEnabled("ClickId", 30);

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("UploadProfilePicture");
        }
        public void forgotPasswordValidation()
        {
            XMLParse oXMLData = new XMLParse();

            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Click on forgot password link
            loginHelper.ClickElement("forgotpassword");

            //verify title
            verifyTitle("Forgot your password?");

            //click on email link button
            loginHelper.ClickElement("emaillink");

            //verify validation message for email
            loginHelper.WaitForTextInPage("The Email field is required.", 30);

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("LoginAndLogout - Attendee");
        }
        public void createEventWithDuplicateEventName()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());
            eventHelper = new EventHelper(GetWebDriver());

            username = oXMLData.getData("settings/credentials", "AttendeeUsername");
            password = oXMLData.getData("settings/credentials", "AttendeePassword");

            String EventName = "Test_Event" + AlwaysRandom();
            int today = GetTodayDate();

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with email address
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Page title
            verifyTitle("Event List");

            //Click on Create new event
            eventHelper.ClickElement("CreateNewEvent");

            //wait for text
            eventHelper.WaitForTextInPage("Event Type", 20);

            //Verify title
            verifyTitle("Create");

            //Select Event type
            eventHelper.SelectValueFilter("EventType", "Conference");

            //Enter Event title
            eventHelper.type("EventTitle", "Singing comptition");

            //Click on Manual Location
            eventHelper.ClickElement("ManualLocation");

               //verify Validation message
            eventHelper.WaitForTextInPage("The event name: Singing comptition has already been used and is not available.", 30);

            //Click on user-id
            loginHelper.ClickElement("ClickId");

            //Logout from the application.
            loginHelper.ClickElement("LogOut");

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("CreateEventWithDuplicateEventName - Attendee");
        }
        public void createEventValidation()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());
            eventHelper = new EventHelper(GetWebDriver());

            username = oXMLData.getData("settings/credentials", "AttendeeUsername");
            password = oXMLData.getData("settings/credentials", "AttendeePassword");

            String EventName = "Test_Event" + AlwaysRandom();
            int today = GetTodayDate();

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with email address
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Page title
            verifyTitle("Event List");

            //CLick on Event dropdown.
            eventHelper.ClickElement("EventDropdown");

            //Click on Create new event
            eventHelper.ClickElement("CreateNewEvent");

            //wait for text
            eventHelper.WaitForTextInPage("Event Type", 20);

            //Verify title
            verifyTitle("Create");

            //Click on 'Create Event button without entering any details
            eventHelper.ClickElement("Create");

            //Verify validation message
            eventHelper.WaitForTextInPage("Event name must be specified", 60);

            //Click on user-id
            loginHelper.ClickElement("ClickId");

            //Logout from the application.
            loginHelper.ClickElement("LogOut");

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("CreateEventValidation - Attendee");
        }
        public void loginValidation()
        {
            string username = "";
            string[] password = null;

            XMLParse oXMLData = new XMLParse();

            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());

            password = oXMLData.getData("settings/credentials", "AttendeePassword");

            username = loginHelper.GetFromFile("Register");

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //verify validation message
            loginHelper.WaitForTextInPage("The Email field is required.", 30);

            //verify validation message for password
            loginHelper.WaitForTextInPage("The Password field is required.", 30);

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("LoginAndLogout - Attendee");
        }
        public void loginValidation1()
        {
            string username = "";

            XMLParse oXMLData = new XMLParse();

            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());

            username = loginHelper.GetFromFile("Register");

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with email address
            Login(username, "y");

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //verify page text
            loginHelper.WaitForTextInPage("Invalid login attempt.", 30);

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("LoginAndLogout - Attendee");
        }
        public void editAdministrator()
        {
            string username = "";
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());
            eventHelper = new EventHelper(GetWebDriver());

            username = loginHelper.GetFromFile("Register");
            password = oXMLData.getData("settings/credentials", "AttendeePassword");

            String EventName = "Test_Event" + AlwaysRandom();
            String EventURL = URL + "/" + EventName + "/E/";

            int Startdate = GetTodayDate()+1;
            int Enddate = GetTodayDate() + 2;

            //Wait for text
            loginHelper.WaitForTextInPage("Use your email to sign in.", 40);

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with email address
            Login(username, password[0]);
            Console.WriteLine("Logged in as: " + username + " / " + password[0]);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Page title
            verifyTitle("Event List");

            //CLick on Event dropdown.
            eventHelper.ClickElement("EventDropdown");

            //Click on Create new event
            eventHelper.ClickElement("CreateNewEvent");

            //wait for text
            eventHelper.WaitForTextInPage("Event Type", 20);

            //Verify title
            verifyTitle("Create");

            //Select Event type
            eventHelper.SelectValueFilter("EventType", "Conference");

            //Enter Event title
            eventHelper.type("EventTitle", EventName);

            //Click on Manual Location
            eventHelper.ClickElement("ManualLocation");

            //Enter Venue
            eventHelper.type("VenueName", "Noida");

            //Enter Address 1
            eventHelper.type("Address1", "Sector");

            //Enter Adresss 2
            eventHelper.type("Address2", "70");

            //Enter City
            eventHelper.type("City", "Noida");

            //Enter State
            eventHelper.type("State", "UP");

            //Enter Zip
            eventHelper.type("Zip", "201301");

            //Enter Start Date
            eventHelper.SelectDate("StartDate", Startdate.ToString());

            //Enter End Date
            eventHelper.SelectDate("EndDate", Enddate.ToString());

            //Write Description
            eventHelper.typeDescription(0, "This is test description");

            //Click on 'Create Event button.
            eventHelper.ClickElement("Create");

            //wait for text
            eventHelper.WaitForTextInPage("No sales", 30);

            //Verify title
            verifyTitle(EventName + " - Dashboard");

            //click on event info
            eventHelper.ClickElement("Eventinfo");

            //click on administrators
            eventHelper.ClickElement("Administrators");

            //verify title
            verifyTitle("UserRoles");

            //click on addnew
            eventHelper.ClickElement("Addnewadmin");

            //wait
            eventHelper.WaitForWorkArround(3000);

            //input email
            eventHelper.type("inputemail", "*****@*****.**");

            //click on next
            eventHelper.ClickElement("next");

            //wait
            eventHelper.WaitForWorkArround(2000);
            //selet roles
            eventHelper.ClickElement("roleadmin");

            //clcik on add button
            eventHelper.ClickElement("addbutton");

            //wait
            eventHelper.WaitForWorkArround(4000);

            //verify email is on page
            eventHelper.VerifyPageText("*****@*****.**");

            //click on edit
            eventHelper.ClickElement("editadmin");

            //wait
            eventHelper.WaitForWorkArround(3000);

            //verify page text
               // eventHelper.VerifyPageText("Edit roles for Test1 Test2");

            //click on remove button
            eventHelper.ClickElement("removeadmin");

            //wait
            eventHelper.WaitForWorkArround(3000);

            //verify text not on page
            eventHelper.VerifyPageTextNotAvailable("*****@*****.**");

            //Click on user-id
            loginHelper.ClickElement("ClickId");

            //Logout from the application.
            loginHelper.ClickElement("LogOut");

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("CreateEvent - Attendee");
        }
        public void updateProfileEmail()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());
            profileHelper = new ProfileHelper(GetWebDriver());

            username = oXMLData.getData("settings/credentials", "AttendeeUsername");
            password = oXMLData.getData("settings/credentials", "AttendeePassword");

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with email address
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Page title
            verifyTitle("Event List");

            //Click on user-id
            loginHelper.ClickElement("ClickId");

            //Click on my Profile
            profileHelper.ClickElement("MyProfile");

            //Click on Add new email button.
            profileHelper.performClick("AddEmail");

            //Click on Save button without entering email
            profileHelper.performClick("SaveEmail");

            //Verif vaidation message.
            profileHelper.WaitForTextInPage("There are missing email addresses. If you want to remove an email address click the delete button",20);

            //Enter Email
            profileHelper.typeInLastElement("EmailInput", "*****@*****.**");

            //Click on Save button
            profileHelper.performClick("SaveEmail");

            //Wait for text
            profileHelper.WaitForTextInPage("Your Emails(s) has successfully been saved", 20);

            //Reset details to deault

            //Delete phone number
            profileHelper.clickLastElement("DeleteEmail");

            //Click on Save button
            profileHelper.performClick("SaveEmail");

            //Wait for text
            profileHelper.WaitForTextInPage("Your Emails(s) has successfully been saved", 20);

            //Logout from the application
            Logout();

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("UpdateProfileEmail - Attendee");
        }
        public void ticketFreeEdit()
        {
            string username = "";
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());
            eventHelper = new EventHelper(GetWebDriver());

            username = loginHelper.GetFromFile("Register");
            password = oXMLData.getData("settings/credentials", "AttendeePassword");

            String EventName = "Test_Event" + AlwaysRandom();
            String EventURL = URL + "/" + EventName + "/E/";

            int Startdate = GetTodayDate()+1;
            int Enddate = GetTodayDate() + 2;

            //Wait for text
            loginHelper.WaitForTextInPage("Use your email to sign in.", 40);

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with email address
            Login(username, password[0]);
            Console.WriteLine("Logged in as: " + username + " / " + password[0]);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Page title
            verifyTitle("Event List");

            //click on event title
            eventHelper.ClickElement("event1title");

            //wait
            eventHelper.WaitForWorkArround(3000);

            //wait for text
            eventHelper.WaitForTextInPage("No sales", 30);

            //scroll
            eventHelper.scrollToElement("eventregistration");

            //click on reg
            eventHelper.ClickElement("eventregistration");

            //click on tic
            eventHelper.ClickElement("ticketing");

            //verifytitlt
            verifyTitle("Ticketing");

            //click on free tic
            //eventHelper.ClickElement("newfreeticket");

            //wait
            eventHelper.WaitForWorkArround(3000);

            //input name
            eventHelper.type("TicketName", "newfree");

            //input quantity
            //eventHelper.type("Quantity", "100");

            //click on save
            eventHelper.ClickElement("saveticket");

            //wait
            eventHelper.WaitForWorkArround(3000);

            //verify tic name
            eventHelper.WaitForTextInPage("newfree", 30);

            //Click on user-id
            loginHelper.ClickElement("ClickId");

            //Logout from the application.
            loginHelper.ClickElement("LogOut");

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("CreateEvent - Attendee");
        }
        public void changePassword()
        {
            string username = "";
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());

            username = loginHelper.GetFromFile("Register");
            password = oXMLData.getData("settings/credentials", "AttendeePassword");

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with email address
            Login(username, password[0]);
            Console.WriteLine("Logged in as: " + username + " / " + password[0]);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Page title
            verifyTitle("Event List");

            //Click on user-id
            loginHelper.ClickElement("ClickId");

            //Click on Change Password
            loginHelper.ClickElement("ChangePassword");

            //Wait for text
            loginHelper.WaitForTextInPage("Confirm Password", 30);

            //Enter Current password
            loginHelper.type("CurrentPassword", "1qaz!QAZ");

            //Enter New password
            loginHelper.type("NewPassword", "NewPassword");

            //Enter Confirm password
            loginHelper.type("ConfirmPasswor", "NewPassword");

            //Click on Change password button
            loginHelper.ClickElement("ChangeSave");

            //Wait for text
            loginHelper.WaitForTextInPage("Password was changed", 30);

            //Logout from the application
            Logout();

            //Verify title
            verifyTitle("Attendee.Events - Log in");

            String Password1 = "NewPassword";
            //Login with New Password
            Login(username, Password1);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Change Password to deault

            //Verify Page title
            verifyTitle("Event List");

            //Click on user-id
            loginHelper.ClickElement("ClickId");

            //Click on Change Password
            loginHelper.ClickElement("ChangePassword");

            //Wait for text
            loginHelper.WaitForTextInPage("Confirm Password", 30);

            //Enter Current password
            loginHelper.type("CurrentPassword", Password1);

            //Enter New password
            loginHelper.type("NewPassword", password[0]);

            //Enter Confirm password
            loginHelper.type("ConfirmPasswor", password[0]);

            //Click on Change password button
            loginHelper.ClickElement("ChangeSave");

            //Wait for text
            loginHelper.WaitForTextInPage("Password was changed", 30);

            //Logout from the application
            Logout();

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("ChangePassword - Attendee");
        }
        public void approveAbstract()
        {
            string username = "";
            string[] password = null;
            string[] newusername = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());
            eventHelper = new EventHelper(GetWebDriver());
            ticketHelper = new TicketHelper(GetWebDriver());
            abstractHelper = new AbstractHelper(GetWebDriver());

            username = loginHelper.GetFromFile("Register");
            password = oXMLData.getData("settings/credentials", "AttendeePassword");
            newusername = oXMLData.getData("settings/credentials", "Username");

            //Wait for text
            loginHelper.WaitForTextInPage("Use your email to sign in.", 40);

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with email address
            Login(username, password[0]);
            Console.WriteLine("Logged in as: " + username + " / " + password[0]);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Page title
            verifyTitle("Event List");

               // String Eventname = ticketHelper.GetText("FirstEvent");

            //Open first event
            ticketHelper.ClickElement("FirstEvent");

            //wait for text
            ticketHelper.WaitForTextInPage("Total:",30);

            //Click on home tab
            ticketHelper.ClickElement("HomeTab");

            //Click on user-id
            ticketHelper.ClickElement("LogOff");

            //Wait for text
            ticketHelper.WaitForTextInPage("Log in", 30);

            //Go to speaker page
            abstractHelper.ClickElement("Speaker");

            //Click on Login link
            ticketHelper.ClickElement("Login");

            //Login into the application
            Login(newusername[0],password[0]);

            //Click on sign in button
            loginHelper.ClickElement("Signin");

            //wait for text
            ticketHelper.WaitForTextInPage(newusername[0],30);

            //Go to registration page
            abstractHelper.ClickElement("Speaker");

            //Wait for text
            abstractHelper.WaitForTextInPage("Speaker", 30);

            //Click on Submit abstract button.
            abstractHelper.ClickElement("SubmitAbstract");

            //wait for text
            abstractHelper.WaitForTextInPage("New", 30);

            //Click on New Button
            abstractHelper.ClickElement("NewAbstract");

            //wait for text
            abstractHelper.WaitForTextInPage("Create New Abstract", 30);

            String abstractTitle = "Abstract"+AlwaysRandom();

            //Enter title
            abstractHelper.type("Title", abstractTitle);

            //Enter abstract
            abstractHelper.typeDescription(0, "Demo Test");

            //Enter Objectvie
            abstractHelper.typeDescription(1, "Demo Test");

            //Enter
            abstractHelper.typeDescription(2,"Demo test");

            //Submit abstract
            abstractHelper.performClick("Submit");

            //wait for txt
            abstractHelper.WaitForTextInPage(abstractTitle,40);

            Logout();

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with email address
            Login(username, password[0]);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Open first event
            ticketHelper.ClickElement("FirstEvent");

            //wait for text
            ticketHelper.WaitForTextInPage("Total:", 30);

            //Click on Speaker
            abstractHelper.ClickElement("SpeakerCreater");

            //Click on submition
            abstractHelper.ClickElement("Submission");

            //wait for text
            abstractHelper.WaitForTextInPage("Abstracts", 30);

            //verify abstract available
            abstractHelper.WaitForTextInPage(abstractTitle,30);

            //get count of approved abstract
            int approvedcount = abstractHelper.getCount("AccepttedRow");

            //click on approve button
            abstractHelper.ClickElement("Accept");

            //verify approved abstract displayed under teh approved section
            abstractHelper.verifyresult("AccepttedRow", approvedcount, "Greater");

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("ApproveAbstract - Attendee");
        }
        public void cancelUpdatingProfileBIO()
        {
            string username = "";
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());
            profileHelper = new ProfileHelper(GetWebDriver());

            username = loginHelper.GetFromFile("Register");
            password = oXMLData.getData("settings/credentials", "AttendeePassword");

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with email address
            Login(username, password[0]);
            Console.WriteLine("Logged in as: " + username + " / " + password[0]);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Page title
            verifyTitle("Event List");

            //Click on user-id
            loginHelper.ClickElement("ClickId");

            //Click on my Profile
            profileHelper.ClickElement("MyProfile");

            //wait for text
            profileHelper.WaitForTextInPage("User Bio", 20);

            //Enter First name
            profileHelper.type("Firstname", "Test Updated");

            //Enter Last name
            profileHelper.type("LastName", "Automation Updated");

            //Enter company
            profileHelper.type("Company", "Testing Updated");

            //Ente job title
            profileHelper.type("JobTitle", "Senior QA");

            //Enter BIO
            //profileHelper.typeDescription("user-Biography_ifr", "This is Updated BIO of the user.");

            profileHelper.ClickElement("JobTitle");

            //Click on Save button
            profileHelper.performClick("CancelBio");

               //refresh page
            RefreshPage();

            //wait for text
            profileHelper.WaitForTextInPage("User Bio", 20);

            //Verify saved first name
            profileHelper.verifyfieldText("Firstname", "Aman");

            //Verify saved Last name
            profileHelper.verifyfieldText("LastName", "Khan");

            //Verify Saved company
            profileHelper.verifyfieldText("Company", "Testing");

            //Verify saved job title
            profileHelper.verifyfieldText("JobTitle", "QA");

            //Logout from the application
            Logout();

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("CancelUpdatingProfileBIO - Attendee");
        }
        public void updateProfileBIO()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());
            profileHelper = new ProfileHelper(GetWebDriver());

            username = oXMLData.getData("settings/credentials", "AttendeeUsername");
            password = oXMLData.getData("settings/credentials", "AttendeePassword");

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with email address
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Page title
            verifyTitle("Event List");

            //Click on user-id
            loginHelper.ClickElement("ClickId");

            //Click on my Profile
            profileHelper.ClickElement("MyProfile");

            //wait for text
            profileHelper.WaitForTextInPage("User Bio", 20);

            //Enter First name
            profileHelper.type("Firstname", "Test Updated");

            //Enter Last name
            profileHelper.type("LastName", "Automation Updated");

            //Enter company
            profileHelper.type("Company", "Testing Updated");

            //Ente job title
            profileHelper.type("JobTitle", "Senior QA");

            //Enter BIO
            profileHelper.typeDescription(0, "This is Updated BIO of the user.");

            profileHelper.ClickElement("JobTitle");

            //Click on Save button
            profileHelper.performClick("SaveBio");

            //Wait for text
            profileHelper.WaitForTextInPage("Your User Bio has successfully been saved.", 20);

            //Verify saved first name
            profileHelper.verifyfieldText("Firstname", "Test Updated");

            //Verify saved Last name
            profileHelper.verifyfieldText("LastName", "Automation Updated");

            //Verify Saved company
            profileHelper.verifyfieldText("Company", "Testing Updated");

            //Verify saved job title
            profileHelper.verifyfieldText("JobTitle", "Senior QA");

            //Reset details to deault

            //Enter First name
            profileHelper.type("Firstname", "Test");

            //Enter Last name
            profileHelper.type("LastName", "Automation");

            //Enter company
            profileHelper.type("Company", "Testing");

            //Ente job title
            profileHelper.type("JobTitle", "QA");

            //Click on Save button
            profileHelper.performClick("SaveBio");

            //Wait for text
            profileHelper.WaitForTextInPage("Your User Bio has successfully been saved.", 20);

            //Logout from the application
            Logout();

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("UpdateProfileBIO - Attendee");
        }
        public void changePasswordValidation()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());

            username = oXMLData.getData("settings/credentials", "AttendeeUsername");
            password = oXMLData.getData("settings/credentials", "AttendeePassword");

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with email address
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Page title
            verifyTitle("Event List");

            //Click on user-id
            loginHelper.ClickElement("ClickId");

            //Click on Change Password
            loginHelper.ClickElement("ChangePassword");

            //Wait for text
            loginHelper.WaitForTextInPage("Confirm Password", 30);

            //Click on Change password without any field.
            loginHelper.ClickElement("ChangeSave");

            //Verify Validation message
            loginHelper.VerifyPageText("The Current password field is required.");
            loginHelper.VerifyPageText("The New password field is required.");

            //Enter Wrong current password
            loginHelper.type("CurrentPassword", "WrongPassword");

            //Enter New password
            loginHelper.type("NewPassword", "NewPassword");

            //Enter Confirm password
            loginHelper.type("ConfirmPasswor", "NewPassword");

            //Click on Change password after entering wrong password
            loginHelper.ClickElement("ChangeSave");

            //Wait for text
            loginHelper.WaitForTextInPage("Incorrect password.", 30);

            //Verify validation message
            loginHelper.VerifyPageText("Incorrect password.");

            //Enter Correct current password
            loginHelper.type("CurrentPassword", password[0]);

            //Enter New password
            loginHelper.type("NewPassword", "newpassword");

            //Enter Confirm password
            loginHelper.type("ConfirmPasswor", "NewPassword");

            //Click on Change password after entering diffecrent passwords
            loginHelper.ClickElement("ChangeSave");

            //verify validation message
            loginHelper.VerifyPageText("The new password and confirmation password do not match.");

            //Logout from the application
            Logout();

            //Verify title
            verifyTitle("Attendee.Events - Log in");

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("ChangePassword - Attendee");
        }
Exemplo n.º 16
0
        public void createEvent()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());
            eventHelper = new EventHelper(GetWebDriver());

            username = oXMLData.getData("settings/credentials", "AttendeeUsername");
            password = oXMLData.getData("settings/credentials", "AttendeePassword");

            String EventName = "Test_Event" + AlwaysRandom();
            String EventURL = URL + "/" + EventName + "/E/";

            int Startdate = GetTodayDate()+1;
            int Enddate = GetTodayDate() + 2;

            //Wait for text
            loginHelper.WaitForTextInPage("Use your email to sign in.", 40);

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with email address
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Page title
            verifyTitle("Event List");

            //CLick on Event dropdown.
            eventHelper.ClickElement("EventDropdown");

            //Click on Create new event
            eventHelper.ClickElement("CreateNewEvent");

            //wait for text
            eventHelper.WaitForTextInPage("Event Type", 20);

            //Verify title
            verifyTitle("Create");

            //Select Event type
            eventHelper.SelectValueFilter("EventType", "Conference");

            //Enter Event title
            eventHelper.type("EventTitle", EventName);

            //Click on Manual Location
            eventHelper.ClickElement("ManualLocation");

            //Enter Venue
            eventHelper.type("VenueName", "Noida");

            //Enter Address 1
            eventHelper.type("Address1", "Sector");

            //Enter Adresss 2
            eventHelper.type("Address2", "70");

            //Enter City
            eventHelper.type("City", "Noida");

            //Enter State
            eventHelper.type("State", "UP");

            //Enter Zip
            eventHelper.type("Zip", "201301");

            //Enter Start Date
            eventHelper.SelectDate("StartDate", Startdate.ToString());

            //Enter End Date
            eventHelper.SelectDate("EndDate", Enddate.ToString());

            //Write Description
            eventHelper.typeDescription(0, "This is test description");

            //Click on 'Create Event button.
            eventHelper.ClickElement("Create");

            //wait for text
            eventHelper.WaitForTextInPage("No sales", 30);

            //Verify title
            verifyTitle(EventName + " - Dashboard");

            //Click on user-id
            loginHelper.ClickElement("ClickId");

            //Logout from the application.
            loginHelper.ClickElement("LogOut");

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("CreateEvent - Attendee");
        }
        public void deleteCustomFields()
        {
            string username = "";
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());
            eventHelper = new EventHelper(GetWebDriver());

            username = loginHelper.GetFromFile("Register");
            password = oXMLData.getData("settings/credentials", "AttendeePassword");

            String EventName = "Test_Event" + AlwaysRandom();
            String EventURL = URL + "/" + EventName + "/E/";

            int Startdate = GetTodayDate()+1;
            int Enddate = GetTodayDate() + 2;

            //Wait for text
            loginHelper.WaitForTextInPage("Use your email to sign in.", 40);

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with email address
            Login(username, password[0]);
            Console.WriteLine("Logged in as: " + username + " / " + password[0]);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Page title
            verifyTitle("Event List");

            //CLick on Event dropdown.
            eventHelper.ClickElement("EventDropdown");

            //Click on Create new event
            eventHelper.ClickElement("CreateNewEvent");

            //wait for text
            eventHelper.WaitForTextInPage("Event Type", 20);

            //Verify title
            verifyTitle("Create");

            //Select Event type
            eventHelper.SelectValueFilter("EventType", "Conference");

            //Enter Event title
            eventHelper.type("EventTitle", EventName);

            //Click on Manual Location
            eventHelper.ClickElement("ManualLocation");

            //Enter Venue
            eventHelper.type("VenueName", "Noida");

            //Enter Address 1
            eventHelper.type("Address1", "Sector");

            //Enter Adresss 2
            eventHelper.type("Address2", "70");

            //Enter City
            eventHelper.type("City", "Noida");

            //Enter State
            eventHelper.type("State", "UP");

            //Enter Zip
            eventHelper.type("Zip", "201301");

            //Enter Start Date
            eventHelper.SelectDate("StartDate", Startdate.ToString());

            //Enter End Date
            eventHelper.SelectDate("EndDate", Enddate.ToString());

            //Write Description
            eventHelper.typeDescription(0, "This is test description");

            //Click on 'Create Event button.
            eventHelper.ClickElement("Create");

            //wait for text
            eventHelper.WaitForTextInPage("No sales", 30);

            //Verify title
            verifyTitle(EventName + " - Dashboard");

            //click on event info
            eventHelper.ClickElement("eventregistration");

            //click on ticket
            eventHelper.ClickElement("ticketing");

            //verify title
            verifyTitle("Ticketing");

            //scroll
            eventHelper.scrollToElement("newcustom");

            //click on new custom
            eventHelper.ClickElement("newcustom");

            //input name
            eventHelper.type("customname", "New Custom");

            //scroll
            eventHelper.scrollToElement("savecustom");

            //click on save
            eventHelper.ClickElement("savecustom");

            //wait
            eventHelper.WaitForWorkArround(3000);

            //verfiy page text
            eventHelper.VerifyPageText("New Custom");

            //scroll
            //eventHelper.scrollToElement("deletecustom");

            //delete the field
            eventHelper.clickIndex("deletecustom",2);

            //wait
            eventHelper.WaitForWorkArround(3000);

            //verify
            eventHelper.verifyElementNotDisplayed("customname");

            //wait
            eventHelper.WaitForWorkArround(3000);

            //Click on user-id
            loginHelper.ClickElement("ClickId");

            //Logout from the application.
            loginHelper.ClickElement("LogOut");

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("CreateEvent - Attendee");
        }
        public void loginValidation()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());

            String username1 = "";
            String password1 = "";

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with Blank fields
            Login(username1, password1);
            Console.WriteLine("Logged in as: " + username1 + " / " + password1);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Validation messgae
            loginHelper.VerifyPageText("The Email field is required");
            loginHelper.VerifyPageText("The Password field is required");

            password1 = "1qaz!QAZ";

            //Login without Username
            Login(username1, password1);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Validation messgae
            loginHelper.VerifyPageText("The Email field is required");

            username1 = "*****@*****.**";
            password1 = "";

            //Login without Password
            Login(username1, password1);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Validation messgae
            loginHelper.VerifyPageText("The Password field is required");

            username1 = "*****@*****.**";
            password1 = "invalid";

            //Login after invalid credentials Password
            Login(username1, password1);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Validation messgae
            loginHelper.VerifyPageText("Invalid login attempt");

            username = oXMLData.getData("settings/credentials", "AttendeeUsername");
            password = oXMLData.getData("settings/credentials", "AttendeePassword");

            //Login after valid credentials Password
            Login(username[0], password[0]);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Page title
            verifyTitle("Event List");

            //Verify Home Page
            loginHelper.verifyElementPresent("Home");

            //Click on user-id
            loginHelper.ClickElement("ClickId");

            //Logout from the application.
            loginHelper.ClickElement("LogOut");

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("LoginValidation - Attendee");
        }
Exemplo n.º 19
0
        public void buyTicket()
        {
            string[] username = null;
            string[] password = null;
            string[] newusername = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());
            eventHelper = new EventHelper(GetWebDriver());
            ticketHelper = new TicketHelper(GetWebDriver());

            username = oXMLData.getData("settings/credentials", "AttendeeUsername");
            password = oXMLData.getData("settings/credentials", "AttendeePassword");
            newusername = oXMLData.getData("settings/credentials", "Username");

            //Wait for text
            loginHelper.WaitForTextInPage("Use your email to sign in.", 40);

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with email address
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Page title
            verifyTitle("Event List");

               // String Eventname = ticketHelper.GetText("FirstEvent");

            //Open first event
            ticketHelper.ClickElement("FirstEvent");

            //wait for text
            ticketHelper.WaitForTextInPage("Total:",30);

            //Click on register tab
            ticketHelper.clickLastElement("RegisterTab");

            //Click on Ticketting
            ticketHelper.ClickElement("Ticketting");

            //Wait for text
            ticketHelper.WaitForTextInPage("New Free Ticket", 30);

            //Click on New Free ticket
            ticketHelper.verifyticket("FreeTicket");

            //Click on home tab
            ticketHelper.ClickElement("HomeTab");

            //Click on user-id
            ticketHelper.ClickElement("LogOff");

            //Wait for text
            ticketHelper.WaitForTextInPage("Log in", 30);

            //Go to registration page
            ticketHelper.ClickElement("Register");

            //Click on Login link
            ticketHelper.ClickElement("Login");

            //Login into the application
            Login(newusername[0],password[0]);

            //Click on sign in button
            loginHelper.ClickElement("Signin");

            //wait for text
            ticketHelper.WaitForTextInPage(newusername[0],30);

            //Go to registration page
            ticketHelper.ClickElement("Register");

            //Enter Quantity of ticket
            ticketHelper.type("QuanTicket", "2");

            //Click on Buy now button
            ticketHelper.performClick("GetRegister");

            //Wait for text
            ticketHelper.WaitForTextInPage("Submit Registration", 20);

            //Click on Submit registration
            ticketHelper.performClick("SubmitRegistration");

            //wait for text
            ticketHelper.WaitForTextInPage("Ticket", 60);

            //verify status
            ticketHelper.WaitForTextInPage("Status:", 20);

            //
            ticketHelper.WaitForTextInPage("approved", 30);

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("BuyTicket - Attendee");
        }
        public void updateProfilePhone()
        {
            string username = "";
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());
            profileHelper = new ProfileHelper(GetWebDriver());
            eventHelper = new EventHelper(GetWebDriver());

            username = loginHelper.GetFromFile("Register");
            password = oXMLData.getData("settings/credentials", "AttendeePassword");

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with email address
            Login(username, password[0]);
            Console.WriteLine("Logged in as: " + username + " / " + password[0]);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //wait for text
            loginHelper.WaitForTextInPage("My Event List", 60);

            //Verify Page title
            verifyTitle("Event List");

            //Click on user-id
            loginHelper.ClickElement("ClickId");

            //Click on my Profile
            profileHelper.ClickElement("MyProfile");

            //scroll
            profileHelper.scrollToElement("Set");

            //Click on Add new Phone button.
            profileHelper.ClickElement1("AddPhone");

            //profileHelper.ClickElement("AddPhone");

            //wait
            //eventHelper.WaitForWorkArround(3000);

            //enter area code
            profileHelper.typeInLastElement("areacode", "111");

            //Enter phone number
            profileHelper.typeInLastElement("PhoneNumber", "1234567890");

            //Enter Phone Ext
            profileHelper.typeInLastElement("PhoneExt", "911");

            //Click on Save button
            profileHelper.performClick("SavePhone");

            //Wait for text
            profileHelper.WaitForTextInPage("Your phone Number(s) has successfully been saved", 20);

            //Reset details to deault

            //Delete phone number
               // profileHelper.clickLastElement("DeletePhone");

            //Click on Save button
            //profileHelper.performClick("SavePhone");

            //Wait for text
            //profileHelper.WaitForTextInPage("Your phone Number(s) has successfully been saved", 20);

            //Logout from the application
            Logout();

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("UpdateProfilePhone - Attendee");
        }
        public void updateProfileAddress()
        {
            string username = "";
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());
            profileHelper = new ProfileHelper(GetWebDriver());

            username = loginHelper.GetFromFile("Register");
            password = oXMLData.getData("settings/credentials", "AttendeePassword");

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with email address
            Login(username, password[0]);
            Console.WriteLine("Logged in as: " + username + " / " + password[0]);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Page title
            verifyTitle("Event List");

            //Click on user-id
            loginHelper.ClickElement("ClickId");

            //Click on my Profile
            profileHelper.ClickElement("MyProfile");

            //wait for text
            profileHelper.WaitForTextInPage("User Bio", 20);

            //Enter Address1
            profileHelper.type("Address1", "3090 S Jamaica Ct");

            //Enter Address2
            profileHelper.type("Address2", "Suite 313");

            //Enter city
            profileHelper.type("City", "Denver");

            //Enter Zip
            profileHelper.type("Zip", ",80014");

            profileHelper.ClickElement("Zip");

            //Click on Save button
            profileHelper.performClick("SaveAddress");

            //Wait for text
            profileHelper.WaitForTextInPage("Your Address has successfully been saved.", 20);

            //Verify saved Address1
            profileHelper.verifyfieldText("Address1", "3090 S Jamaica Ct");

            //Verify saved Address2
            profileHelper.verifyfieldText("Address2", "Suite 313");

            //Verify saved City
            profileHelper.verifyfieldText("City", "Denver");

            //Verify Saved Zip
            profileHelper.verifyfieldText("Zip", ",80014");

            //Reset details to deault

            //Enter Address1
            profileHelper.type("Address1", "");

            //Enter Address2
            profileHelper.type("Address2", "");

            //Enter City
            profileHelper.type("City", "");

            //Ente Zip
            profileHelper.type("Zip", ",");

            //Click on Save button
            profileHelper.performClick("SaveAddress");

            //Wait for text
            profileHelper.WaitForTextInPage("Your Address has successfully been saved.", 20);

            //Logout from the application
            Logout();

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("UpdateProfileAddress - Attendee");
        }
        public void cancelUpdatingProfileAddress()
        {
            string[] username = null;
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());
            profileHelper = new ProfileHelper(GetWebDriver());

            username = oXMLData.getData("settings/credentials", "AttendeeUsername");
            password = oXMLData.getData("settings/credentials", "AttendeePassword");

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with email address
            Login(username[0], password[0]);
            Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Page title
            verifyTitle("Event List");

            //Click on user-id
            loginHelper.ClickElement("ClickId");

            //Click on my Profile
            profileHelper.ClickElement("MyProfile");

            //wait for text
            profileHelper.WaitForTextInPage("User Bio", 20);

            //Enter Address1
            profileHelper.type("Address1", "3090 S Jamaica Ct");

            //Enter Address2
            profileHelper.type("Address2", "Suite 313");

            //Enter city
            profileHelper.type("City", "Denver");

            //Enter Zip
            profileHelper.type("Zip", ",80014");

            profileHelper.ClickElement("Zip");

            //Click on Save button
            profileHelper.performClick("CancelBio");

               //refresh page
            RefreshPage();

            //wait for text
            profileHelper.WaitForTextInPage("User Bio", 20);

            //Verify saved first name
            profileHelper.verifyfieldText("Address1", "");

            //Verify saved Last name
            profileHelper.verifyfieldText("Address2", "");

            //Verify Saved company
            profileHelper.verifyfieldText("City", "");

            //Verify saved job title
            profileHelper.verifyfieldText("Zip", "");

            //Logout from the application
            Logout();

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("CancelUpdatingProfileAddress - Attendee");
        }
        public void myTicketsPage()
        {
            string username = "";
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());
            eventHelper = new EventHelper(GetWebDriver());
            ticketHelper = new TicketHelper(GetWebDriver());

            username = loginHelper.GetFromFile("Register");
            password = oXMLData.getData("settings/credentials", "AttendeePassword");

            String EventName = "Test_Event" + AlwaysRandom();
            String EventURL = URL + "/" + EventName + "/E/";

            int Startdate = GetTodayDate()+1;
            int Enddate = GetTodayDate() + 2;

            //Wait for text
            loginHelper.WaitForTextInPage("Use your email to sign in.", 40);

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with email address
            Login(username, password[0]);
            Console.WriteLine("Logged in as: " + username + " / " + password[0]);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Page title
            verifyTitle("Event List");

            //CLick on Event dropdown.
            eventHelper.ClickElement("EventDropdown");

            //Click on Create new event
            eventHelper.ClickElement("CreateNewEvent");

            //wait for text
            eventHelper.WaitForTextInPage("Event Type", 20);

            //Verify title
            verifyTitle("Create");

            //Select Event type
            eventHelper.SelectValueFilter("EventType", "Conference");

            //Enter Event title
            eventHelper.type("EventTitle", EventName);

            //Click on Manual Location
            eventHelper.ClickElement("ManualLocation");

            //Enter Venue
            eventHelper.type("VenueName", "Noida");

            //Enter Address 1
            eventHelper.type("Address1", "Sector");

            //Enter Adresss 2
            eventHelper.type("Address2", "70");

            //Enter City
            eventHelper.type("City", "Noida");

            //Enter State
            eventHelper.type("State", "UP");

            //Enter Zip
            eventHelper.type("Zip", "201301");

            //Enter Start Date
            eventHelper.SelectDate("StartDate", Startdate.ToString());

            //Enter End Date
            eventHelper.SelectDate("EndDate", Enddate.ToString());

            //Write Description
            eventHelper.typeDescription(0, "This is test description");

            //Click on 'Create Event button.
            eventHelper.ClickElement("Create");

            //wait for text
            eventHelper.WaitForTextInPage("No sales", 30);

            //Verify title
            verifyTitle(EventName + " - Dashboard");

            //click on event info
            eventHelper.ClickElement("eventregistration");

            //click on ticket
            eventHelper.ClickElement("ticketing");

            //verify title
            verifyTitle("Ticketing");

            //click on free ticket
            eventHelper.ClickElement("newfreeticket");

            //wait
            eventHelper.WaitForWorkArround(2000);

            //input name
            eventHelper.typeInLastElement("TicketName", "free1");

            //input quantity
            eventHelper.typeInLastElement("Quantity", "10");

            //click on save
            eventHelper.ClickElement("saveticket");

            //wait
            eventHelper.WaitForWorkArround(3000);

            //Click on home tab
            ticketHelper.ClickElement("HomeTab");

            //wait
            eventHelper.WaitForWorkArround(3000);

            //Go to registration page
            ticketHelper.ClickElement("Register");

            //wait
            eventHelper.WaitForWorkArround(8000);

            //Enter Quantity of ticket
            ticketHelper.type("QuanTicket", "2");

            //Click on Buy now button
            ticketHelper.performClick("GetRegister");

            //Wait for text
            ticketHelper.WaitForTextInPage("Submit Registration", 20);

            //scroll
            ticketHelper.scrollToElement("SubmitRegistration");

            //wait
            ticketHelper.WaitForWorkArround(3000);

            //Click on Submit registration
            ticketHelper.performClick("SubmitRegistration");

            //wait
            eventHelper.WaitForWorkArround(3000);

            //wait for text
            ticketHelper.WaitForTextInPage("Quantity", 60);

            //wait
            eventHelper.WaitForWorkArround(3000);

            //verify status
            ticketHelper.WaitForTextInPage("Status:", 20);

            //
            ticketHelper.WaitForTextInPage("approved", 30);

            //wait
            eventHelper.WaitForWorkArround(3000);

            //click on my tickets
            eventHelper.ClickElement("mytickets");

            //title
            verifyTitle("My Tickets");

            //event name on page
            eventHelper.WaitForTextInPage(EventName, 30);

            //Click on user-id
            loginHelper.ClickElement("ClickId");

            //Logout from the application.
            loginHelper.ClickElement("LogOut");

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("CreateEvent - Attendee");
        }
        public void downloadSpeaker()
        {
            string username = "";
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());
            eventHelper = new EventHelper(GetWebDriver());

            username = loginHelper.GetFromFile("Register");
            password = oXMLData.getData("settings/credentials", "AttendeePassword");

            String EventName = "Test_Event" + AlwaysRandom();
            String EventURL = URL + "/" + EventName + "/E/";

            int Startdate = GetTodayDate()+1;
            int Enddate = GetTodayDate() + 2;

            //Wait for text
            loginHelper.WaitForTextInPage("Use your email to sign in.", 40);

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with email address
            Login(username, password[0]);
            Console.WriteLine("Logged in as: " + username + " / " + password[0]);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Page title
            verifyTitle("Event List");

            //CLick on Event dropdown.
            eventHelper.ClickElement("EventDropdown");

            //Click on Create new event
            eventHelper.ClickElement("CreateNewEvent");

            //wait for text
            eventHelper.WaitForTextInPage("Event Type", 20);

            //Verify title
            verifyTitle("Create");

            //Select Event type
            eventHelper.SelectValueFilter("EventType", "Conference");

            //Enter Event title
            eventHelper.type("EventTitle", EventName);

            //Click on Manual Location
            eventHelper.ClickElement("ManualLocation");

            //Enter Venue
            eventHelper.type("VenueName", "Noida");

            //Enter Address 1
            eventHelper.type("Address1", "Sector");

            //Enter Adresss 2
            eventHelper.type("Address2", "70");

            //Enter City
            eventHelper.type("City", "Noida");

            //Enter State
            eventHelper.type("State", "UP");

            //Enter Zip
            eventHelper.type("Zip", "201301");

            //Enter Start Date
            eventHelper.SelectDate("StartDate", Startdate.ToString());

            //Enter End Date
            eventHelper.SelectDate("EndDate", Enddate.ToString());

            //Write Description
            eventHelper.typeDescription(0, "This is test description");

            //Click on 'Create Event button.
            eventHelper.ClickElement("Create");

            //wait for text
            eventHelper.WaitForTextInPage("No sales", 30);

            //Verify title
            verifyTitle(EventName + " - Dashboard");

            //clcik on event home
            eventHelper.ClickElement("eventhome");

               //verify page text
            eventHelper.WaitForTextInPage(EventName,30);

            //click on instructors
            eventHelper.ClickElement("instructors");

            //verify page text
            eventHelper.WaitForTextInPage(EventName, 30);

            //click on manage abs
            eventHelper.ClickElement("manageabs");

            //verify title
            verifyTitle("Abstracts");

            //click on new
            eventHelper.ClickElement("newabs");

            //verify title
            verifyTitle("Create New Abstract");

            //enter title
            eventHelper.type("inputtitle", "abs1");

            //enter length
               // eventHelper.SelectValueFilter("inputlength", "60 min");

            //enter level
            //eventHelper.SelectValueFilter("inputlevel", "100");

            //Write Description
            eventHelper.typeDescription(2, "This is test description");

            //scroll to element
            eventHelper.scrollToElement("submitabs");

            //click on submit
            eventHelper.ClickElement("submitabs");

            //wait
            eventHelper.WaitForWorkArround(5000);

            //verify title
            verifyTitle("Abstracts");

            //verify abstract name
            eventHelper.WaitForTextInPage("abs1", 30);

            //click on ins
            eventHelper.ClickElement("instructoradmin");

            //click on submissions
            eventHelper.ClickElement("submissions");

            //verify title
            verifyTitle("Abstracts");

            //verify abstract name
            eventHelper.WaitForTextInPage("abs1", 30);

            //clcick on accept
            eventHelper.ClickElement("accept");

            //verify abstract name
            eventHelper.WaitForTextInPage("abs1", 30);

            //click on list
            eventHelper.ClickElement("download");

            //Click on user-id
            loginHelper.ClickElement("ClickId");

            //Logout from the application.
            loginHelper.ClickElement("LogOut");

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("CreateEvent - Attendee");
        }
Exemplo n.º 25
0
        public void editEvent()
        {
            string username = "";
            string[] password = null;

            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSetting.xml");
            loginHelper = new AttendeeLoginHelper(GetWebDriver());
            eventHelper = new EventHelper(GetWebDriver());

            username = loginHelper.GetFromFile("Register");
            password = oXMLData.getData("settings/credentials", "AttendeePassword");

            String EventName = "Test_Event" + AlwaysRandom();
            String EventURL = URL + "/" + EventName + "/E/";

            int Startdate = GetTodayDate()+1;
            int Enddate = GetTodayDate() + 2;

            int Startdate1 = GetTodayDate() + 3;
            int Enddate1 = GetTodayDate() + 5;

            String StartDate = Int16.Parse(GetCurrentMonth()) + "/" + Startdate.ToString() + "/" + GetCurrentYear();
            Console.WriteLine("StartDate");

            //Wait for text
            loginHelper.WaitForTextInPage("Use your email to sign in.", 40);

            //Verify Page title
            verifyTitle("Attendee.Events - Log in");

            //Login with email address
            Login(username, password[0]);
            Console.WriteLine("Logged in as: " + username + " / " + password[0]);

            //Click on sigin button
            loginHelper.ClickElement("Signin");

            //Verify Page title
            verifyTitle("Event List");

            //CLick on Event dropdown.
            eventHelper.ClickElement("EventDropdown");

            //Click on Create new event
            eventHelper.ClickElement("CreateNewEvent");

            //wait for text
            eventHelper.WaitForTextInPage("Event Type", 20);

            //Verify title
            verifyTitle("Create");

            //Select Event type
            eventHelper.SelectValueFilter("EventType", "Conference");

            //Enter Event title
            eventHelper.type("EventTitle", EventName);

            //Click on Manual Location
            eventHelper.ClickElement("ManualLocation");

            //Enter Venue
            eventHelper.type("VenueName", "Noida");

            //Enter Address 1
            eventHelper.type("Address1", "Sector");

            //Enter Adresss 2
            eventHelper.type("Address2", "70");

            //Enter City
            eventHelper.type("City", "Noida");

            //Enter State
            eventHelper.type("State", "UP");

            //Enter Zip
            eventHelper.type("Zip", "201301");

            //Enter Start Date
            eventHelper.SelectDate("StartDate", Startdate.ToString());

            //Enter End Date
            eventHelper.SelectDate("EndDate", Enddate.ToString());

            //Write Description
            eventHelper.typeDescription(0, "This is test description");

            //Click on 'Create Event button.
            eventHelper.ClickElement("Create");

            //wait for text
            eventHelper.WaitForTextInPage("No sales", 30);

            //Verify title
            verifyTitle(EventName + " - Dashboard");

            //click on event info
            eventHelper.ClickElement("Eventinfo");

            //scroll to element
            //eventHelper.ScrollDown("Eventdetails");

            //click on event details
            eventHelper.ClickElement("Eventdetails");

            //verify title
            verifyTitle("Edit");

            //wait
            eventHelper.WaitForWorkArround(5000);

            //verify previous title
            eventHelper.verifyfieldText("EventTitle", EventName);

            //verify address
            eventHelper.verifyfieldText("VenueName", "Noida");

            //verify address
            eventHelper.verifyfieldText("Address1", "Sector");

            //verify address
            eventHelper.verifyfieldText("Address2", "70");

            //verify city
            eventHelper.verifyfieldText("City", "Noida");

            //verify starting date
            eventHelper.verifyfieldText("StartDate", StartDate);

            string Editevent = "Edit" + GetRandomNumber();

            //enter new event title
            eventHelper.type("EventTitle", Editevent);

            //Enter new Venue
            eventHelper.type("VenueName", "Noida1");

            //Enter New Address 1
            eventHelper.type("Address1", "Sector1");

            //Enter New Adresss 2
            eventHelper.type("Address2", "71");

            //Enter New City
            eventHelper.type("City", "Noida1");

            //Enter New State
            eventHelper.type("State", "UP");

            //Enter New Zip
            eventHelper.type("Zip", "201906");

            //Enter Start Date
            eventHelper.SelectDate("StartDate", Startdate1.ToString());

            //Enter End Date
            eventHelper.SelectDate("EndDate", Enddate1.ToString());

            //scroll to element
            eventHelper.scrollToElement("Editsave");

            //click on save
            eventHelper.performClick("Editsave");

            //verify page title
            verifyTitle("Event List");

            //wait
            eventHelper.WaitForWorkArround(5000);

            //verify event name on page
            eventHelper.WaitForTextInPage(Editevent,30);

            //Click on user-id
            loginHelper.ClickElement("ClickId");

            //Logout from the application.
            loginHelper.ClickElement("LogOut");

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("CreateEvent - Attendee");
        }