Beispiel #1
0
 def fill(self):
     base = super(MyInformationPage, self)
     self.driver.find_element_by_xpath(
         '//*[@id="textInput.nameComponent--uid12-input"]').send_keys(
             self.user.first_name)
     Timer.sleep()
     self.driver.find_element_by_xpath(
         '//*[@id="textInput.nameComponent--uid13-input"]').send_keys(
             self.user.last_name)
     Timer.sleep()
     self.driver.find_element_by_xpath(
         '//*[@id="textInput.phone--uid19-input"]').send_keys(
             self.user.phone_number)
     self.driver.find_element_by_xpath(
         '//*[@id="dropDownSelectList.sources-input--uid20-input"]/div[1]/div'
     ).click()
     Timer.sleep()
     drop_down_element = self.driver.find_element_by_xpath(
         '//div[@id="dropDownSelectList.sources-input-entry-3"]')
     base.try_and_click(drop_down_element)
     Timer.sleep()
     self.driver.find_element_by_xpath(
         '//button[@data-automation-id="wd-CommandButton_next"]').click()
     Timer.sleep()
     base.click_next_button()
Beispiel #2
0
    def fill(self):
        base = super(SelfIdentityPage, self)

        check_boxes = self.driver.find_elements_by_xpath('//div[@data-automation-id="checkboxPanel"]')
        answer = InputOutput.input_yes_no('\n\nDo you wish to answer a question on your disability(/ies), if any?')
        if not answer:
            base.try_and_click(check_boxes[2])
        else:
            InputOutput.output("How do I know if I have a disability?\nYou are considered to have a disability if "
                               "you have a physical or mental impairment or medical condition that substantially "
                               "limits a major life activity, or if you have a history or record of such an "
                               "impairment or medical condition.\nDisabilities include, but are not limited to: \n- "
                               "Blindness\n- Deafness\n- Cancer\n- Diabetes\n- Epilepsy\n- Autism\n- Cerebral "
                               "palsy\n- HIV/AIDS\n- Schizophrenia\n- Muscular dystrophy\n- Bipolar disorder\n- "
                               "Major depression\n- Multiple sclerosis (MS)\n- Missing limbs or partially missing "
                               "limbs\n- Post-traumatic stress disorder (PTSD)\n- Obsessive compulsive disorder\n- "
                               "Impairments requiring the use of a wheelchair\n- Intellectual disability ("
                               "previously called mental retardation)")
            disabilities_answer = InputOutput.input_yes_no('Do you have or have had any of the above disabilities?')
            if disabilities_answer:
                base.try_and_click(check_boxes[0])
            else:
                base.try_and_click(check_boxes[1])

        self.driver.find_element_by_xpath('(//div[@data-automation-id="textInput"])[6]/input').send_keys(self.full_name)

        Timer.sleep()

        base.try_and_click(self.driver.find_element_by_xpath('//span[@data-automation-id="dateSectionMonth"]'))
        ActionChains(self.driver).send_keys(time.strftime("%m%d%Y")).perform()

        base.click_next_button()
Beispiel #3
0
 def select_option_from_drop_down(self, option, drop_down):
     self.try_and_click(drop_down)
     Timer.sleep()
     drop_down_element = self.driver.find_element_by_xpath(
         '//div[@data-automation-label="{0}"]/../../..'.format(option))
     self.try_and_click(drop_down_element)
     Timer.sleep()
Beispiel #4
0
 def __wait_till_other_filter_drop_downs_refresh():
     Timer.sleep(2)
Beispiel #5
0
        job_index = int(
            InputOutput.input('Enter Sl.No of Job to apply for : '))
        if job_index in range(0, len(job_results)):
            email_address = InputOutput.input('Email address : ')
            first_name = InputOutput.input('First Name : ')
            last_name = InputOutput.input('Last Name : ')
            phone_number = InputOutput.get_valid_phone_number()
            gender = InputOutput.input('Gender',
                                       ['Male', 'Female', 'Undeclared'])
            user = User(first_name, last_name, phone_number, email_address,
                        InputOutput.get_valid_password(), gender)
            answers = Answers(False, False, False, False, False, ["India"],
                              True, True)

            job_application = JobApplication(driver, job_results[job_index],
                                             user, build_pages())
            job_application.apply()

            InputOutput.output('\n\n' + Color.UNDERLINE + Color.BOLD +
                               'Job Application complete! Thank you for using '
                               'our service.' + Color.END + Color.END)
            Timer.sleep(5)
        else:
            raise Exception('Invalid job chosen')

    except Exception as e:
        InputOutput.output(e)
        InputOutput.output('No Jobs found')
    finally:
        driver.close()