Esempio n. 1
0
class AddCVForm(Form):
    first_name = TextField(By.css("[placeholder='First Name']"))
    last_name = TextField(By.css("[placeholder='Last Name']"))
    email = TextField(By.css("[placeholder='Email']"))

    country = Dropdown(
        root=By.css(".country-wrapper"),
        by_select_locator=By.css(".arrow"),
        by_option_locator_template=By.xpath(
            "*root*//*[contains(@id,'select-box-applicantCountry')]//li[.='%s']"
        ),
    )

    city = Dropdown(
        root=By.css(".country-wrapper"),
        by_select_locator=By.css(".arrow"),
        by_option_locator_all=By.xpath(
            "*root*//*[contains(@id,'select-box-applicantCity')]//li"),
    )

    cv = RFileInput(By.css(".file-upload"))
    comment = TextArea(By.xpath(".comment-input"))

    submut = Button(By.xpath("//*[.='Submit']"))
    cancel = Button(By.xpath("//*[.='Cancel']"))
Esempio n. 2
0
class ContactFormTwoButtons(Form):
    def __init__(self, by_locator=None):
        super(ContactFormTwoButtons, self).__init__(by_locator)

    first_name = TextField(By.id("Name"))
    last_name = TextField(By.id("LastName"))
    description = TextArea(By.id("Description"))

    submit = Button(By.xpath("//*[text()='Submit']"))
    calculate = Button(By.xpath("//*[text()='Calculate']"))

    def get_form_value(self):
        return {self.first_name.get_text(), self.last_name.get_text(), self.description.get_text()}
Esempio n. 3
0
class JDISearch(Search):
    search_input = TextField(By.css(".search-field input"))
    search_button = Button(By.css(".search .search-active .icon-search"))

    def find(self, text):
        Button(By.css(".search>.icon-search")).click()
        super(JDISearch, self).find(text)
Esempio n. 4
0
class FramePage(WebPage):
    def __init__(self, url, title=None, domain=None):
        super(FramePage, self).__init__(url, title, domain)

    i_frame = FrameSection(By.id("iframeResult"))

    try_it_button = Button(By.link_text("Try it Yourself »"))
Esempio n. 5
0
File: login.py Progetto: zyme/JDI
class Login(Form):

    login = TextField(By.id("Login"))

    password = TextField(By.id("Password"))

    button = Button(By.css(".btn-login"))

    profile = Clickable(By.css(".profile-photo"))

    def submit(self, user):
        Login.profile.click()
        super(Login, self).submit_form(user)
Esempio n. 6
0
class MetalColorPage(WebPage):
    def __init__(self, url, title):
        super(MetalColorPage, self).__init__(url=url, title=title)

    calculate_button = Button(By.id("calculate-button"))

    cb_water = CheckBoxMetalColor(
        By.xpath("//*[@id='elements-checklist']//*[text()='Water']"))

    calculate_label = Label(By.id("calculate-button"))

    nature_check_list = CheckListMetalColor(
        By.css("#elements-checklist label"))
Esempio n. 7
0
class JobFilter(Form):
    keyword = TextField(By.css(".job-search-input"))
    category = Dropdown(root=By.css(".multi-select-department"),
                        by_select_locator=By.css(".multi-select-filter"),
                        by_option_locator_all=By.css(".blue-checkbox-label"))

    location = TreeDropdown(
        By.css(".career-location-box"),
        [By.css(".location-dropdown .optgroup"),
         By.xpath("//..//li")])

    select_button = Button(By.css(".job-search-button"))
    label = Label(By.css(".job-search-title"))
Esempio n. 8
0
class MetalColorPage(WebPage):
    def __init__(self, url, title):
        super(MetalColorPage, self).__init__(url=url, title=title)

    calculate_button = Button(By.id("calculate-button"))

    cb_water = CheckBoxMetalColor(By.xpath("//*[@id='elements-checklist']//*[text()='Water']"))

    calculate_label = Label(By.id("calculate-button"))

    nature_check_list = CheckListMetalColor(By.css("#elements-checklist label"))

    combo_box = ComboBoxMetalColor(select_locator=By.css(".metals .caret"),
                                   options_names_locator_template=By.css(".metals li span"),
                                   value_locator=By.css(".metals input"))

    color_dropdown = Dropdown(By.css(".colors .filter-option"), By.css(".colors li span"))

    summary = Summary(By.id("summary-block"))
Esempio n. 9
0
 def find(self, text):
     Button(By.css(".search>.icon-search")).click()
     super(JDISearch, self).find(text)
Esempio n. 10
0
File: search.py Progetto: zyme/JDI
 def get_find_button(self):
     find_button = Button(self.get_locator())
     find_button.set_parent(self.get_parent())
     return find_button
Esempio n. 11
0
File: search.py Progetto: zyme/JDI
 def __init__(self, by_locator=None, by_select_locator=None, by_suggestions_list_locator=None):
     super(Search, self).__init__(by_locator)
     self.find_button_button = Button(by_select_locator)
     self.suggestions = TextList(by_suggestions_list_locator)
Esempio n. 12
0
class FrameSection(Section):
    label_button = Button(By.css("button"))
Esempio n. 13
0
class JDIPagination(Pagination):
    next_button = Button(By.css("[class=next]  a"))
    previous_button = Button(By.css("[class=prev]  a"))
    first_button = Button(By.css("[class=first] a"))
    last_button = Button(By.css("[class=last]  a"))
    page = Button(By.css(".uui-pagination li"))