class SettingsPageLocators(object):

    FIRST_NAME = by.name('firstName')
    LAST_NAME = by.name('lastName')
    AGE = by.name('age')
    GENDER_MALE = '[value="Male"]'
    GENDER_FEMALE = '[value="Female"]'
    SAVE_CHANGES = '[class*="button_save_changes"]'
Esempio n. 2
0
class LoginPageLocators(object):

    EMAIL                       = by.name('email')
    PASSWORD                    = by.name('password')
    SIGN_IN                     = '[class*="sign_in_button"]'
    ERROR_MESSAGE               = '[class*="error__"]'
    ERROR_EMPTY_EMAIL_FIELD     = '[class*="login_form"] > [class*="custom_error"] > [class*="error_message"]'
    ERROR_EMPTY_PASSWORD_FIELD  = '[class*="password_field"] > [class*="custom_error"] > [class*="error_message"]'
class ForgotPassPageLocators(object):

    EMAIL = by.name('email')
    FORGOT_PASSWORD = '******'
    NEXT = '[class*="btn_issue_details"]'
    SIGN_IN = '[class*="sign_in"]'
    EMAIL_TITLE = '[class*="email_title__"]'
    SMALL_EMAIL_TITLE = '[class*="email_title_item"]'
    ERROR_MESSAGE = '[class*="error_message"]'
    ERROR_EMPTY_EMAIL = '[class*="custom_error"] > [class*="error_message"]'
from selene.support.shared import browser
from selene.support.conditions import be, not_
from selene.support import by

browser.open('http://google.com')

browser.s(by.name('q')).should(be.blank).type('live de python')

browser.s(by.name('q')).should(not_.blank).type('100')
from selene import Browser, Config
from selenium.webdriver import Firefox
from selene.support import by
from selene.support.conditions import not_, be, have

"""
    Validação
"""

browser = Browser(
    Config(
        driver=Firefox(),
        base_url='https://google.com',
    )
)

browser.open('')

browser.s(by.name('q')).should(be.blank).type('Live de python')

browser.s(by.name('q')).should(not_.blank).type('teste em python')

browser.s(by.name('q')).should(have.attribute('name').value('q'))

Esempio n. 6
0
 def write_advanced_text(self, advanced_text):
     element(by.name(MainPage.search_string)).set(advanced_text)