Ejemplo n.º 1
0
        public void GetElements()
        {
            FindElement findElement = new FindElement(_driver);

            homeLink          = findElement.ByCssSelector($"a[data-test='home']");
            signOutLink       = findElement.ByCssSelector($"a[data-test='sign-out']");
            AddressesLink     = findElement.ByCssSelector($"a[data-test='addresses']");
            firstNameInput    = findElement.ById("address_first_name");
            lastNameInput     = findElement.ById("address_last_name");
            address1Input     = findElement.ById("address_street_address");
            address2Input     = findElement.ById("address_secondary_address");
            cityInput         = findElement.ById("address_city");
            stateComboBox     = findElement.ById("address_state");
            zipcodeInput      = findElement.ById("address_zip_code");
            countryUS         = findElement.ById("address_country_us");
            countryCA         = findElement.ById("address_country_canada");
            birthdayInput     = findElement.ById("address_birthday");
            colorInput        = findElement.ById("address_color");
            ageCombobox       = findElement.ById("address_age");
            websiteInput      = findElement.ById("address_website");
            pictureSaveButton = findElement.ById("address_picture");
            phoneInput        = findElement.ById("address_phone");
            climbingCheckBox  = findElement.ById("address_interest_climb");
            dancingCheckBox   = findElement.ById("address_interest_dance");
            readingCheckBox   = findElement.ById("address_interest_read");
            noteInput         = findElement.ById("address_note");
            listLink          = findElement.ByCssSelector($"a[data-test='list']");
            submitButton      = findElement.ByCssSelector($"input[data-test='submit']");
            //showLink = findElement.ByCssSelector($"a[data-test='show']");
        }
Ejemplo n.º 2
0
        public void getListElements(string id)
        {
            FindElement findElement = new FindElement(_driver);

            showLink    = findElement.ByCssSelector($"a[data-test='show-" + id + "']");
            editLink    = findElement.ByCssSelector($"a[data-test='edit-" + id + "']");
            destroyLink = findElement.ByCssSelector($"a[data-test='destroy-" + id + "']");
        }
Ejemplo n.º 3
0
        public void GetElements()
        {
            FindElement findElement = new FindElement(_driver);

            homeLink    = findElement.ByCssSelector($"a[data-test='home']");
            signOutLink = findElement.ByCssSelector($"a[data-test='sign-out']");
            //toggleButton = findElement.ByCssSelector($"button[data-toggle='collapse']");
            AddressesLink = findElement.ByCssSelector($"a[data-test='addresses']");
            createButton  = findElement.ByCssSelector($"a[data-test='create']");
        }
Ejemplo n.º 4
0
        public void GetElements()
        {
            FindElement findElement = new FindElement(_driver);

            homeLink      = findElement.ByCssSelector($"a[data-test='home']");
            signInLink    = findElement.ById("sign-in");
            inputUserName = findElement.ById("user_email");
            inputPassword = findElement.ById("user_password");
            signUpButton  = findElement.ByCssSelector($"input[name='commit']");
            signInButton  = findElement.ByCssSelector($"a[data-test='sign-in']");
        }
Ejemplo n.º 5
0
        public void GetElements()
        {
            FindElement findElement = new FindElement(_driver);

            homeLink = findElement.ByCssSelector($"a[data-test='home']");
            //if can`t find sign in link than user is already logged so sign out link is displayed.
            try
            {
                signInLink = findElement.ByCssSelector($"a[data-test='sign-in']");
            }
            catch (Exception)
            {
                signOutLink = findElement.ByCssSelector($"a[data-test='sign-out']");
            }
            //toggleButton = findElement.ByCssSelector($"button[data-toggle='collapse']");
            AddressesLink = findElement.ByCssSelector($"a[data-test='addresses']");
        }