コード例 #1
0
        public void organizationSetup()
        {
            Console.WriteLine("_02OrganizationSetup");

            String orgname = "ORG"+AlwaysRandom();

            string username = "";
            string[] password = null;

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

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Organization Info");

            //Enter organization name
            registerHelper.type("OrgName", orgname);

            //Enter URL:
            registerHelper.type("URL", orgname);

            //Enter Email:
            registerHelper.type("OrgEmail", username);

            //Click on 'Save' button.
            registerHelper.ClickElement("SaveOrg");

            //wait for text
            registerHelper.WaitForTextInPage("Organization info saved successfully", 30);

            //Verify saved organozation name.
            registerHelper.verifyFieldText("OrgName", orgname);

            //Verify saved URL
            registerHelper.verifyFieldText("URL", orgname);

            //Logout from the application
            Logout();

            //Capture screenshot fot the screen
            registerHelper.TakeScreenshot("OrganizationSetup - Artzy");
        }
コード例 #2
0
        public void certificateUsageValidation()
        {
            Console.WriteLine("_16CertificateUsageValidation");

            string username = "";
            string[] password = null;

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

            String giftName = loginHelper.GetFromFile("Certificate");

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");
            password = oXMLData.getData("settings/credentials", "Artzypassword");

            //Verify title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

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

            //Click on my gift certificate
            eventHelper.ClickElement("MyGiftcertificate");

            //Verify title
            verifyTitle("Check GC Balance");

            //Click on Check button wihtout entering number
            eventHelper.ClickElement("GCTrans");

            //Verify validation message
            eventHelper.WaitForTextInPage("Please enter gift certificate code.", 20);

            //Enter invalid gift code
            eventHelper.type("GiftCode", "12123");

            //Click on Check button
            eventHelper.ClickElement("GCTrans");

            //Verify validation message
            eventHelper.WaitForTextInPage(" No transaction found.", 30);

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("CheckCertificateUsage - Artzy");
        }
コード例 #3
0
        public void validationdiscount()
        {
            Console.WriteLine("_25ValidationDiscounts");

            string username = "";
            string[] password = null;

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

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

            //Scroll to element
            eventHelper.scrollToElement("Discount");

            //Click on discount tab
            eventHelper.ClickElement("Discount");

            //Verify page title
            verifyTitle("Discounts");

            //click on new discounts
            eventHelper.ClickElement("newdiscount");

            //verify title
            verifyTitle("Add Discount");

            //enter value of discounts
            eventHelper.type("pricediscount", "");

            //enter value of limit
            eventHelper.type("limitdiscounts", "11");

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

            //verify text
            eventHelper.verifyElementPresent("enterrequiredvalues");
        }
コード例 #4
0
        public void soldTicket()
        {
            Console.WriteLine("_17SoldTicket");

            string username = "";
            string[] password = null;

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

            String eventName = loginHelper.GetFromFile("EventName");

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

            //Verify ticket quantity
            String tickQuantity = loginHelper.GetTextFromField("Tot");

            //Verify available quantity
            String AvaQuantity = loginHelper.GetTextFromField("Ava");

            int saved = Int32.Parse(tickQuantity)-Int32.Parse(AvaQuantity);
            Console.WriteLine(tickQuantity + "\t" + AvaQuantity + "\t" + saved);

            //Verify sold quantity
            Assert.IsTrue(Int32.Parse(loginHelper.GetTextFromField("Sold")) == saved);

            //Logout from the application
            Logout();

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("SoldTicket - Artzy");
        }
コード例 #5
0
        public void loginAndLogout()
        {
            Console.WriteLine("_03LoginAndLogout");

            string username = "";
            string[] password = null;

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

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

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

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

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("LoginAndLogout - Artzy");
        }
コード例 #6
0
        public void updateOrgInfo()
        {
            Console.WriteLine("_23UpdateOrgInfo");

            String email = "aman" + AlwaysRandom() + "@yopmail.com";
            String orgname = "ORG" + AlwaysRandom();

            string username = "";
            string[] password = null;

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

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

            //Scroll to element
            registerHelper.scrollToElement("Settings");

            //Click on Setting dropdown.
            registerHelper.ClickElement("Settings");

            //Scroll to element
            registerHelper.scrollToElement("Orginfo");

            //Click on org infor tab
            registerHelper.ClickElement("Orginfo");

            //Wait for text
            registerHelper.WaitForTextInPage("Email", 20);

            //Update organization name
            registerHelper.type("OrgName", orgname);

            //Update URL:
            registerHelper.type("URL", orgname);

            //Update Email:
            registerHelper.type("OrgEmail", orgname + "@yopmail.com");

            //Click on 'Save' button.
            registerHelper.ClickElement("SaveOrg");

            //wait for text
            registerHelper.WaitForTextInPage("Organization info saved successfully", 30);

            //Verify updated organozation name.
            registerHelper.verifyFieldText("OrgName", orgname);

            //Verify updated URL
            registerHelper.verifyFieldText("URL", orgname);

            //Verify updated email
            registerHelper.verifyFieldText("OrgEmail", orgname + "@yopmail.com");

            //Logout from the application
            Logout();

            //Capture screenshot fot the screen
            registerHelper.TakeScreenshot("UpdateOrgInfo - Artzy");
        }
コード例 #7
0
        public void createAdmin()
        {
            String adminemail = "Admin" + AlwaysRandom()+"@yopmail.com";

            string username = "";
            string[] password = null;

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

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

            adminHelper.scrollToElement("Settings");

            //Click on Settings dropdown
            adminHelper.ClickElement("Settings");

            adminHelper.scrollToElement("Admin");

            //Click on administration
            adminHelper.ClickElement("Admin");

            //Wait for text
            adminHelper.WaitForTextInPage("Email", 60);

            //verify title
            verifyTitle("Administrators");

            bool result = adminHelper.verifyAvailable("AdminAvail");

            if (result)
            {
                //Click on Edit admin button
                adminHelper.ClickElement("Edit");

                //Wait for text
                adminHelper.WaitForTextInPage("Edit roles for", 30);

                //Remove as admin
                adminHelper.ClickElement("RemoveAdmin");

                //wait for text
                adminHelper.WaitForTextHide("Edit roles for", 30);
            }
            //Click on Add New Admin button
            adminHelper.ClickElement("AddNew");

            //wait for text
            adminHelper.WaitForTextInPage("Add New Administrator", 30);

            //Enter Email
            adminHelper.type("AdminEmail", adminemail);

            //Click on 'Next' button
            adminHelper.ClickElement("Next");

            //Check the admin check box
            adminHelper.ClickElement("AdminCheck");

            //Click on Save button
            adminHelper.ClickElement("Save");

            adminHelper.SetInFile("Admin", adminemail);

            //wait for text
            adminHelper.WaitForTextInPage(adminemail, 30);

            //Logout from the application
            Logout();

            Console.WriteLine("CreateAdmin");

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("CreateAdmin - Artzy");
        }
コード例 #8
0
        public void verifyCoantactValidation()
        {
            Console.WriteLine("_24VerifyCoantactValidation");

            string username = "";
            string[] password = null;

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

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

            //Click on on Home tab
            eventHelper.ClickElement("Home");

            //Wait for text
            eventHelper.WaitForTextInPage("Cart", 40);

            //Logout from the application
            Logout();

            //Click on Contact tab.
            eventHelper.ClickElement("ContactTab");

            //Verify title
            verifyTitle("Contact");

            //wait for tickets
            eventHelper.WaitForTextInPage("First Name", 20);

            //Scroll to element
            eventHelper.scrollToElement("SendContact");

            //Click on Send button
            eventHelper.ClickElement("SendContact");

            //Wait for text
            eventHelper.WaitForTextInPage("First name is required.", 20);
            eventHelper.WaitForTextInPage("Last name is required.", 20);
            eventHelper.WaitForTextInPage("Email address is required.", 20);
            eventHelper.WaitForTextInPage("Message is required", 20);

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("verifyCoantactValidation - Artzy");
        }
コード例 #9
0
        public void checkBuyTicket()
        {
            Console.WriteLine("_17CheckBuyTicket");

            string username = "";
            string[] password = null;

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

            String eventName = loginHelper.GetFromFile("EventName");

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

            //Click on on Home tab
            eventHelper.ClickElement("Home");

            //Wait for text
            eventHelper.WaitForTextInPage("Cart", 40);

            //Click on Event tab.
            eventHelper.ClickElement("EventTab");

            //Verify title
            verifyTitle("Upcoming Events");

            //Click on event
            eventHelper.clickOnEvent(eventName);

            //wait for tickets
            eventHelper.WaitForTextInPage("Tickets", 20);

            //Enter quantity
            eventHelper.type("Quantity", "10");

            //Click ON  Buy now button
            eventHelper.ClickElement("BuyNow");

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

            //Enter card number
            eventHelper.type("Card", "4242424242424242");

            //Enter cvv
            eventHelper.type("CVV", "321");

            eventHelper.scrollToElement("Month");

            //Select Month
            eventHelper.SelectLastFilterValue("Month", "05 - May");

            //Select year
            eventHelper.SelectValueFilter("Year", "2019");

            //Enter address
            eventHelper.type("CardAdd", "Test Add");

            //Enter city
            eventHelper.type("CardCity", "Alaska");

            //Select State
            eventHelper.SelectValueFilter("CardState", "Alaska");

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

            //Click on Submit button
            eventHelper.ClickElement("Submit");

            //Wait for order code
            eventHelper.WaitForTextInPage("Order Code:", 30);

            //Wait for event name
            eventHelper.WaitForTextInPage(eventName, 20);

            //Wait for status
            eventHelper.WaitForTextInPage("Paid", 10);

            //Click on menu
            loginHelper.ClickElement("OrderLog");

            //Click on My ticket
            loginHelper.ClickElement("MyTicket");

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

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

            //Wait for ticket
            loginHelper.WaitForTextInPage("10",30);

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("CheckBuyTicket - Artzy");
        }
コード例 #10
0
        public void changePasswordValidation()
        {
            Console.WriteLine("_05ChangePasswordValidation");

            string username = "";
            string[] password = null;

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

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

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

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

            //Verify title
            verifyTitle("Change Password");

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

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

            //Verify Validation message
            loginHelper.VerifyPageText("Please enter current password");
            loginHelper.VerifyPageText("Please enter new password");

            //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.");

            //Logout from the application
            Logout();

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("ChangePassword - Artzy");
        }
コード例 #11
0
        public void locationValidation()
        {
            Console.WriteLine("_11LocationValidation");

            string username = "";
            string[] password = null;
            string venname = "Devner";

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

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

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

            //Scroll down
            eventHelper.scrollToElement("Location");

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

            //Wait for text
            eventHelper.WaitForTextInPage("Locations", 30);

               //Click on Add New Location button
               eventHelper.ClickElement("NewLoc");

               //Click on 'Save button without filling the field.
               eventHelper.performClick("LocSave");

            //veify validation message
               eventHelper.WaitForTextInPage("Venue name is required.", 30);
               eventHelper.WaitForTextInPage("Address1 is required", 30);
               eventHelper.WaitForTextInPage("City is required.", 30);

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

            //Wait for text
            eventHelper.WaitForTextInPage("Venue Name", 30);

            //Enter Venue Name
            eventHelper.type("VenName", venname);

            //Click on 'Save button after filling the venue name field.
            eventHelper.performClick("LocSave");

            //veify validation message
            eventHelper.WaitForTextInPage("Address1 is required", 30);
            eventHelper.WaitForTextInPage("City is required.", 30);

            //Enter Address1
            eventHelper.type("Addre1", "Address1");

            //Click on 'Save button after filling the Address field.
            eventHelper.performClick("LocSave");

            //wait for text
            eventHelper.WaitForTextInPage("City is required.", 30);

            //Logout from the application
            Logout();

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("LocationValidation - Artzy");
        }
コード例 #12
0
        public void buyCertificate()
        {
            Console.WriteLine("_17BuyCertificate");

            string username = "";
            string[] password = null;

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

            String giftName = loginHelper.GetFromFile("Certificate");

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            eventHelper.SetInFile("Certificate", giftName);

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

            //Click on on Home tab
            eventHelper.ClickElement("Home");

            //Wait for text
            eventHelper.WaitForTextInPage("Cart", 40);

            //Logout from the application
            //Logout();

            //Click on giftcertificate tab.
            eventHelper.ClickElement("CertificateTab");

            //Verify title
            verifyTitle("Gift Certificates");

            //Wait fro text
            eventHelper.WaitForTextInPage(giftName, 30);

            //wait for tickets
            eventHelper.WaitForTextInPage("Gift Certificates", 20);

            //Enter quantity
            eventHelper.type("Quantity", "1");

            //Click ON  Buy now button
            eventHelper.ClickElement("BuyNow");

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

            //Enter first name
            eventHelper.type("UserFirst", "Test");

            //Enter Last Name
            eventHelper.type("UserLast", "Buy Certificate");

            //Enter email
            //eventHelper.type("UserEmail", "*****@*****.**");

            //Enter card number
            eventHelper.type("Card", "4242424242424242");

            //Enter cvv
            eventHelper.type("CVV", "321");

            eventHelper.scrollToElement("Month");

            //Select Month
            eventHelper.SelectLastFilterValue("Month", "05 - May");

            //Select year
            eventHelper.SelectValueFilter("Year", "2019");

            //Enter First name
            eventHelper.type("CardFirst", "Test");

            //Enter last Name
            eventHelper.type("CardLast", "Buy");

            //Enter address
            eventHelper.type("CardAdd", "Test Add");

            //Enter city
            eventHelper.type("CardCity", "Alaska");

            //Select State
            eventHelper.SelectValueFilter("CardState", "Alaska");

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

            //Click on Submit button
            eventHelper.ClickElement("Submit");

            //Wait for order code
            eventHelper.WaitForTextInPage("Order Code:", 30);

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("BuyCertificate - Artzy");
        }
コード例 #13
0
        public void createEvent()
        {
            Console.WriteLine("_15CreateEvent");

            String eventName = "AUTOMATEDEVENT" + AlwaysRandom();
            int today = GetTodayDate() + 1;

            string username = "";
            string[] password = null;

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

            eventHelper.SetInFile("EventName", eventName);

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

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

            //Click on List
            eventHelper.ClickElement("EventList");

            //verify event available
            if (!eventHelper.verifyAvailable("EventNotavailable"))
            {
                //Click on Edit button
                eventHelper.ClickElement("EventEdit");

                //Verify title
                verifyTitle("Edit");
            }
            else
            {
                //scroll to element
                eventHelper.scrollToElement("CreateEvent");

                //Click on New button
                eventHelper.ClickElement("CreateEvent");

                //verify title
                verifyTitle("Create");
            }

            //Wait for text
            eventHelper.WaitForTextInPage("Event Title", 60);

            //Enter event Title
            eventHelper.type("EventTitle", eventName);

            //Select Start date
            eventHelper.SelectDate("EventStart", today.ToString());

            //Click on Hours field.
            eventHelper.ClickElement("EventTime");

            //Wait for element
            eventHelper.WaitForTextInPage("30",20);

            //Click on 'Hours
            eventHelper.ClickElement("EventHrs");

            //Click on Min
            eventHelper.ClickElement("EventMin");

            //Click on DONE
            eventHelper.ClickElement("Done");

            if (GetWebDriver().Title.Contains("Edit"))
            {
                //Click on 'Save edit event' button
                eventHelper.ClickElement("SaveEditEvent");

                //Wait for text
                eventHelper.WaitForTextVisible("Success: Your event details have been updated.", 20);
            }

            //Click on New Ticket
            eventHelper.ClickElement("EntTicket");

            //Enter ticket name
            eventHelper.typeInLastElement("EventTicketName", "Paid");

            //Enter ticket quantity
            eventHelper.typeInLastElement("EventTicketQuantity", "100");

            //Enter ticket price
            eventHelper.typeInLastElement("EventTicketPrice", "150");

            if (GetWebDriver().Title.Contains("Edit"))
            {
                //Click on 'Save edit ticket' button
                eventHelper.ClickElement("SaveEditTicket");

                //wait for text
                eventHelper.WaitForTextVisible("Success: Your tickets details have been updated.", 50);
            }

            if(GetWebDriver().Title.Contains("Edit"))
            {
                //scroll to element
                eventHelper.scrollToElement("EventList");

                //Click on list tab
                eventHelper.ClickElement("EventList");
            }
            else
            {
                //Click on Create event button
                eventHelper.ClickElement("CreateButton");
            }

            //Wait for text displayed
            //eventHelper.WaitForTextInPage("Filter Name", 60);

            //Verify title
            verifyTitle("List");

            //Click on 'List'
            eventHelper.ClickElement("ListEvent");

            //Wait for text in page
            eventHelper.WaitForTextInPage(eventName,30);

            //Logout from the application
            Logout();

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("CreateEvent - Artzy");
        }
コード例 #14
0
        public void forgotPassword()
        {
            Console.WriteLine("_22ForgotPassword");

            string username = "";
            string[] password = null;

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

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

            //Verify Page title
            verifyTitle("Artzy- Forgot Password");

            //Enter email
            loginHelper.type("Email", username);

            //Click on email link button
            loginHelper.ClickElement("LinkButton");

            //Verify title
            verifyTitle("Artzy- Forgot Password Confirmation");

            //Go to the yopmail
            GetWebDriver().Navigate().GoToUrl("http://www.yopmail.com/en/");

            //verify title
            verifyTitle("YOPmail");

            //enter email
            loginHelper.type("YopmailLogin",username);

            //click on check inbox
            loginHelper.ClickElement("CheckInbox");

            //Verify title
            verifyTitle("Inbox");

            //Click on email
            loginHelper.clickInFrame("ifinbox", "YopEmail");

            //Click on link
            loginHelper.clickInFrame("ifmail", "HereURL");

            //Switch to new window
            loginHelper.SelectWindow("Reset password");

            //Verify title
            verifyTitle("Reset password");

            //Enter email
            loginHelper.type("Email",username);

            //Enter New Password
            loginHelper.type("ResetPassword", "1qaz1QAZ");

            //Enter Confirm password
            loginHelper.type("ConfirmPasswrd", "1qaz1QAZ");

            //Click on button
            loginHelper.ClickElement("ResetButton");

            //Verify title
            verifyTitle("Artzy - Reset password confirmation");

            //Click on Login link
            loginHelper.ClickElement("LoginLink");

            //verify tite
            verifyTitle("Artzy Login");

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

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("ForgotPassword - Artzy");
        }
コード例 #15
0
        public void creatCertificate()
        {
            Console.WriteLine("_16CreateCertificate");

            String giftName = "AutomatedGift" + AlwaysRandom();

            string username = "";
            string[] password = null;

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

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            eventHelper.SetInFile("Certificate", giftName);

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

            //Srcoll to element
            eventHelper.scrollToElement("CeateCertificate");

            //Click on Create certificare
            eventHelper.ClickElement("CeateCertificate");

            //Verify title
            verifyTitle("Gift Certificates");

            //Click on New button
            eventHelper.ClickElement("NewCertificate");

            //Verify title
            verifyTitle("Add Gift Certificate");

            //Enter Name
            eventHelper.type("CertificateName", giftName);

            //Enter value
            eventHelper.type("CertificateValue", "10");

            //Enter limit
            eventHelper.type("CertificateLimit", "10");

            //Click on Active checkbox
            eventHelper.ClickElement("CertificateActive");

            //Click on Save button
            eventHelper.ClickElement("PageSave");

            //Verify title
            verifyTitle("Gift Certificates");

            //Wait for text
            eventHelper.WaitForTextInPage(giftName, 30);

            //Click on on Home tab
            eventHelper.ClickElement("Home");

            //Wait for text
            eventHelper.WaitForTextInPage("Cart", 40);

            //Logout from the application
            Logout();

            //Click on giftcertificate tab.
            eventHelper.ClickElement("CertificateTab");

            //Verify title
            verifyTitle("Gift Certificates");

            //Wait fro text
            eventHelper.WaitForTextInPage(giftName, 30);

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("CreateCertificate - Artzy");
        }
コード例 #16
0
        public void changePassword()
        {
            Console.WriteLine("_04ChangePassword");

            string username = "";
            string[] password = null;

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

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

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

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

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

            //Verify title
            verifyTitle("Change Password");

            //Enter 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 button
            loginHelper.ClickElement("ChangeSave");

            //Wait for text
            loginHelper.WaitForTextInPage("Password has been changed successfully.", 30);

            //Logout from the application
            Logout();

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Change Password to deault

            //wait for text
            //loginHelper.WaitForTextInPage(username, 30);

            //Verify Page title
            loginHelper.verifyTitle("Index");

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

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

            //Verify title
            verifyTitle("Change Password");

            //Wait for text
            loginHelper.WaitForTextInPage("Confirm New 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 has been changed successfully.", 30);

            //Logout from the application
            Logout();

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("ChangePassword - Artzy");
        }
コード例 #17
0
        public void eventDurationValidation()
        {
            String evedur = "Duration" + AlwaysRandom();

            string username = "";
            string[] password = null;

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

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

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

            //Scroll down
            eventHelper.scrollToElement("EventDu");

            //Click on Event duration
            eventHelper.ClickElement("EventDu");

            //Wait for text
            eventHelper.WaitForTextInPage("Length", 30);

            //Verify Title
            verifyTitle("Settings");

            //Click on Add New Length button
            eventHelper.ClickElement("NewLength");

            //Wait for text hide
            eventHelper.WaitForTextHide("Your new event length is being created.",30);

            //Wait for text
            eventHelper.WaitForTextInPage("Display Text", 30);

            //Click on Save button button without filling details
            eventHelper.ClickElement("DurSave");

            //Verify Validation message
            eventHelper.WaitForTextInPage("Event Length should not be blank.", 30);

            //Logout from the application
            Logout();

            Console.WriteLine("EventDurationValidation");

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("EventDurationValidation - Artzy");
        }
コード例 #18
0
        public void updateProfileEmail()
        {
            Console.WriteLine("_08UpdateProfileEmail");

            string username = "";
            string[] password = null;

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

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

            //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");

            //Accept alert
            profileHelper.acceptAlert();

            //Wait for text
            profileHelper.WaitForTextInPage("Selected Email Address has been deleted successfully.", 30);

            //Logout from the application
            Logout();

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("UpdateProfileEmail - Attendee");
        }
コード例 #19
0
        public void addToCart()
        {
            string username = "";
            string[] password = null;

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

            String eventName = loginHelper.GetFromFile("EventName");

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

            //Click on on Home tab
            eventHelper.ClickElement("Home");

            //Wait for text
            eventHelper.WaitForTextInPage("Cart", 40);

            //Logout from the application
            Logout();

            //Click on Event tab.
            eventHelper.ClickElement("EventTab");

            //Verify title
            verifyTitle("Upcoming Events");

            //Click on event
            eventHelper.clickOnEvent(eventName);

            //wait for tickets
            eventHelper.WaitForTextInPage("Tickets", 20);

            //Enter quantity
            eventHelper.type("Quantity", "10");

            //Click on Add To cart button
            eventHelper.ClickElement("AddtoCartButton");

            //Wait for text
            eventHelper.WaitForTextInPage("Click 'Checkout' to proceed to the checkout process.", 20);

            //Click on Cart
            eventHelper.ClickElement("CartTab");

            //Wait for text in page
            eventHelper.WaitForTextInPage("Remove", 30);

            //Verify ticket name available
            eventHelper.WaitForTextInPage("Paid", 20);

            //Click on Remove button
            eventHelper.ClickElement("RemoveCart");

            //Accept alert
            eventHelper.acceptAlert();

            //Verify ticket removed success fully
            eventHelper.WaitForTextInPage("Ticket removed from cart successfully.", 30);

            Console.WriteLine("BuyTicket");

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("BuyTicket - Artzy");
        }
コード例 #20
0
        public void instructoValidationr()
        {
            Console.WriteLine("_12InstructonValidationr");

            string username = "";
            string[] password = null;

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

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

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

            //Scroll to element
            eventHelper.scrollToElement("CreateIns");

            //Click on Create instructor
            eventHelper.ClickElement("CreateIns");

            //Wait for text
            eventHelper.WaitForTextInPage("Instructors", 30);

            //Verify Title
            verifyTitle("Instructor List");

            //Click on new button
            eventHelper.ClickElement("NewButton");

            //Wait for text
            eventHelper.WaitForTextInPage("Instructor Bio", 30);

            //Verify Title
            verifyTitle("Manage Profile");

            //Enter Email
            //            eventHelper.type("InsEmail", InsEmail);

            //Click on Save button without first and last name
            eventHelper.ClickElement("InsSave");

            //Verify

            //Logout from the application
            Logout();

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("InstructoValidationr - Artzy");
        }
コード例 #21
0
        public void verifyTicketDiscount()
        {
            Console.WriteLine("_25VerifyTicketDiscount");

            string username = "";
            string[] password = null;

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

            String eventName = loginHelper.GetFromFile("EventName");

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");
            username = loginHelper.GetFromFile("Registration");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

            //Click on on Home tab
            eventHelper.ClickElement("Home");

            //Wait for text
            eventHelper.WaitForTextInPage("Cart", 40);

            //Logout from the application
            Logout();

            //Click on Event tab.
            eventHelper.ClickElement("EventTab");

            //Verify title
            verifyTitle("Upcoming Events");

            //Click on event
            eventHelper.clickOnEvent(eventName);

            //wait for tickets
            eventHelper.WaitForTextInPage("Tickets", 20);

            //Enter quantity
            eventHelper.type("Quantity", "10");

            //Click ON  Buy now button
            eventHelper.ClickElement("BuyNow");

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

            string discountcode = eventHelper.GetFromFile("DiscountCode");

            //write code
            eventHelper.type("entercode", discountcode);

            //Scroll to element
            eventHelper.scrollToElement("applycode");

            //click on apply
            eventHelper.ClickElement("applycode");

            //verify text
            eventHelper.verifyAvailable("VerifyCode");
        }
コード例 #22
0
        public void adminRegistration()
        {
            Console.WriteLine("_21AdminRegistration");

            string username = "";
            string[] password = null;
            string[] loginURL = null;

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

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");
            string adminemail = loginHelper.GetFromFile("Admin");

            password = oXMLData.getData("settings/credentials", "Artzypassword");
            loginURL = oXMLData.getData("settings/URL", "ArtzyApplication");

            //Verify Page title
            verifyTitle("Artzy Login");

            //Go to the yopmail
            GetWebDriver().Navigate().GoToUrl("http://www.yopmail.com/en/");

            //verify title
            verifyTitle("YOPmail");

            //enter email
            loginHelper.type("YopmailLogin", adminemail);

            //click on check inbox
            loginHelper.ClickElement("CheckInbox");

            //Verify title
            verifyTitle("Inbox");

            //Click on email
            loginHelper.clickInFrame("ifinbox", "YopEmail");

            //Click on link
            loginHelper.clickInFrame("ifmail", "HereURL");

            //Switch to new window
            loginHelper.SelectWindow("Reset password");

            //Verify title
            verifyTitle("Reset password");

            //Enter email
            loginHelper.type("Email", adminemail);

            //Enter passoword
            loginHelper.type("ResetPassword", password[0]);

            //Enter confirm
            loginHelper.type("ConfirmPasswrd", password[0]);

            //Click on Reset password button
            loginHelper.ClickElement("ResetButton");

            //Verify title
            verifyTitle("Artzy - Reset password confirmation");

            //Go to the login page
            GetWebDriver().Navigate().GoToUrl(loginURL[0]);

            //Verify title
            verifyTitle("Artzy Login");

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

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

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("AdminRegistration - Artzy");
        }
コード例 #23
0
        public void creatCertificateValidation()
        {
            Console.WriteLine("_16CreatCertificateValidation");

            String giftName = "AutomatedGift" + AlwaysRandom();

            string username = "";
            string[] password = null;

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

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

            //Srcoll to element
            eventHelper.scrollToElement("CeateCertificate");

            //Click on Create certificare
            eventHelper.ClickElement("CeateCertificate");

            //Verify title
            verifyTitle("Gift Certificates");

            //Click on New button
            eventHelper.ClickElement("NewCertificate");

            //Verify title
            verifyTitle("Add Gift Certificate");

            //Enter Name
            eventHelper.type("CertificateName", giftName);

            //Click V
            eventHelper.ClickElement("CertificateValue");

            //Click on Save button
            eventHelper.ClickElement("PageSave");

            //Verify Validation message
            eventHelper.WaitForTextInPage("Please enter value.", 30);
            eventHelper.WaitForTextInPage("Values should be numeric and greater than zero", 30);
            eventHelper.WaitForTextInPage("Limit should be integer and greater than zero.", 30);

            //Enter value in negative
            eventHelper.type("CertificateValue", "-1");

            //Click on Save button
            eventHelper.ClickElement("PageSave");

            //Verify Validation message
            eventHelper.WaitForTextInPage("Values should be numeric and greater than zero", 30);

            //Enter value
            eventHelper.type("CertificateValue", "1");

            //Enter limit in negative
            eventHelper.type("CertificateLimit", "-1");

            //Click on Save button
            eventHelper.ClickElement("PageSave");

            //Verify validation
            eventHelper.WaitForTextInPage("Limit should be integer and greater than zero.", 30);

            //Logout from the application
            Logout();

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("CreateCertificateValidation - Artzy");
        }
コード例 #24
0
        public void pageChildInactive()
        {
            Console.WriteLine("_17PageChildInactive");

            string username = "";
            string[] password = null;

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

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");
            string pagename = loginHelper.GetFromFile("Page");
            string childname = loginHelper.GetFromFile("Child");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

            //Click on Site dropdown
            eventHelper.ClickElement("SiteDropdown");

            //Scroll down
            eventHelper.scrollToElement("Navigate");

            //Click on Navigation
            eventHelper.ClickElement("Navigate");

            //Wait for text
            eventHelper.WaitForTextInPage("Navigation", 30);

            //Verify Title
            verifyTitle("Navigation");

            //Activate child
            eventHelper.ClickElement("actions");

            //click to deactivate
            eventHelper.ClickElement("activate");

            //wait for text
            eventHelper.WaitForTextInPage("Navigation saved successfully.", 30);

            //Wait for text
            eventHelper.WaitForTextInPage("Action", 30);

            Thread.Sleep(2000);

            //Scroll to element
            eventHelper.scrollToElement("Home");

            //Click on home tab
            eventHelper.ClickElement("Home");

            //verify title
            //verifyTitle("Home");

            //Wait for text
            eventHelper.WaitForTextInPage("Home", 30);

            //click on home tab
            eventHelper.ClickElement("hometab");

            //Verify child not availble
            eventHelper.VerifyPageTextNotAvailable("child1");//,30);

            //Logout from the application
            Logout();

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("PageChildInactive - Artzy");
        }
コード例 #25
0
        public void updateProfileBIO()
        {
            Console.WriteLine("_06UpdateProfileBIO");

            string username = "";
            string[] password = null;

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

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

            //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");
        }
コード例 #26
0
        public void updateProfileAddress()
        {
            Console.WriteLine("_07UpdateProfileAddress");

            string username = "";
            string[] password = null;

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

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

            //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");
        }
コード例 #27
0
        public void createInstructor()
        {
            Console.WriteLine("_12CreateInstructor");

            String Ins = "AutomatedInstructor" + AlwaysRandom();
            String InsEmail = Ins + "@yopmail.com";
            String eventName = "AutomatedEvent" + AlwaysRandom();
            int today = GetTodayDate() + 1;

            string username = "";
            string[] password = null;

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

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

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

            //Scroll to element
            eventHelper.scrollToElement("CreateIns");

            //Click on Create instructor
            eventHelper.ClickElement("CreateIns");

            //Wait for text
            eventHelper.WaitForTextInPage("Instructors", 30);

            //Verify Title
            verifyTitle("Instructor List");

            if(eventHelper.verifyAvailable("EditIns"))
            {
                //Click on Edit button
                eventHelper.ClickElement("EditIns");
            }
            else
            {
                //Click on new button
                eventHelper.ClickElement("NewButton");
            }

            //Wait for text
            eventHelper.WaitForTextInPage("Instructor Bio", 30);

            //Verify Title
            verifyTitle("Manage Profile");

            //Enter Email
            //            eventHelper.type("InsEmail", InsEmail);

            //Enter First name
            eventHelper.type("InsFirst", Ins);

            //Enter Last name
            eventHelper.type("InsLast", "Last");

            //Enter company
            eventHelper.type("InsCom", "Company");

            //Enter job
            eventHelper.type("InsJob", "Job");

            //Enter BIO
            eventHelper.typeDescription(0, "This is new "+Ins +"Instructor");

            //Click on Save button
            eventHelper.ClickElement("InsSave");

            //wait for text
            eventHelper.WaitForTextInPage(Ins + " Last", 30);

            //Delete the created instructor
            eventHelper.updateIns("Table", Ins + " Last","Delete");

            //Logout from the application
            Logout();

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("CreateInstructor - Artzy");
        }
コード例 #28
0
        public void createPage()
        {
            Console.WriteLine("_17CreatePage");

            String pagename = "Page" + AlwaysRandom();
            string username = "";
            string[] password = null;

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

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

            //Click on Site dropdown
            eventHelper.ClickElement("SiteDropdown");

            //Scroll down
            eventHelper.scrollToElement("Pages");

            //Click on Pages
            eventHelper.ClickElement("Pages");

            //Verify Title
            verifyTitle("Pages");

            bool result = eventHelper.verifyAvailable("PageAvail");

            //Click on Add New Page button
            eventHelper.ClickElement("NewPage");

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

            //Enter Page Name
            eventHelper.type("PageName", pagename);

            //Type description
            eventHelper.typeDescription(0, "This is new " + pagename);

            //Click on Save button
            eventHelper.performClick("PageSave");

            //Wait for text
            eventHelper.WaitForTextInPage("Action", 30);

            eventHelper.SetInFile("Page", pagename);

            //Click on home tab
            eventHelper.ClickElement("Home");

            //Wait for text
            eventHelper.WaitForTextInPage(pagename,30);

            //click on page tab
            eventHelper.ClickLink(pagename);

            //wait for text
            eventHelper.WaitForTextInPage("This is new " + pagename,30);

            //Logout from the application
            Logout();

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("CreatePage - Artzy");
        }
コード例 #29
0
        public void createPageChild()
        {
            Console.WriteLine("_17CreatePageChild");

            string username = "";
            string[] password = null;

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

            //username = oXMLData.getData("settings/credentials", "Artzyusername");
            username = loginHelper.GetFromFile("Registration");
            string pagename = loginHelper.GetFromFile("Page");
            string childname = "Child" + AlwaysRandom();

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

            //Verify Page title
            verifyTitle("Artzy Login");

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

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

            //Verify Page title
            verifyTitle("Index");

            //Click on Site dropdown
            eventHelper.ClickElement("SiteDropdown");

            //Scroll down
            eventHelper.scrollToElement("Navigate");

            //Click on Navigation
            eventHelper.ClickElement("Navigate");

            //Wait for text
            eventHelper.WaitForTextInPage("Navigation", 30);

            //Verify Title
            verifyTitle("Navigation");

               //Click on New folder
            eventHelper.ClickElement("newfolder");

            //wait for text
            eventHelper.WaitForTextInPage("Manage Navigation", 30);

            //enter folder name
            eventHelper.type("foldername","child1");

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

            //Waitfor text hide
            eventHelper.WaitForTextHide("Manage Navigation", 30);

            //wait for text
            eventHelper.WaitForTextInPage("Navigation saved successfully.", 30);

            //Wait for text
            eventHelper.WaitForTextInPage("Sub navigation place holder", 30);

            //Logout from the application
            Logout();

            //Capture screenshot fot the screen
            loginHelper.TakeScreenshot("CreatePageChild - Artzy");
        }