コード例 #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']"))
コード例 #2
0
class ContactForm(Form):
    def __init__(self, by_locator=None):
        super(ContactForm, 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']"))

    def get_form_value(self):
        return {self.first_name.get_text(), self.last_name.get_text(), self.description.get_text()}
コード例 #3
0
ファイル: login.py プロジェクト: 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)
コード例 #4
0
ファイル: jdi_search.py プロジェクト: jdi-testing/jdi-python
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)
コード例 #5
0
class ContactFormPage(WebPage):

    def __init__(self, url, title):
        super(ContactFormPage, self).__init__(url=url, title=title)

    description = TextArea(By.id("Description"))

    name_text_field = TextField(By.id("Name"))
コード例 #6
0
class ContactFormPage(WebPage):
    def __init__(self, url, title):
        super(ContactFormPage, self).__init__(url=url, title=title)

    description = TextArea(By.id("Description"))

    name_text_field = TextField(By.id("Name"))

    contact_form = ContactForm(By.css("main form"))

    contact_form_two_buttons = ContactFormTwoButtons(By.css("main form"))

    result = TextArea(By.css(".results"))
コード例 #7
0
ファイル: add_cv_form.py プロジェクト: zyme/JDI
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"))
コード例 #8
0
ファイル: input.py プロジェクト: Mikhail9090/JDI
 def __init__(self, by_locator=None, web_element=None):
     TextField.__init__(by_locator, web_element)
コード例 #9
0
ファイル: input.py プロジェクト: zyme/JDI
 def __init__(self, by_locator=None, web_element=None):
     TextField.__init__(by_locator, web_element)
コード例 #10
0
ファイル: search.py プロジェクト: zyme/JDI
 def get_text_field(self):
     text_files = TextField(self.get_locator())
     text_files.set_parent(self.get_parent())
     return text_files