• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python ui.Select类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中selenium.webdriver.support.ui.Select的典型用法代码示例。如果您正苦于以下问题:Python Select类的具体用法?Python Select怎么用?Python Select使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Select类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: test_cannot_compute_zero_features

def test_cannot_compute_zero_features(driver, project, dataset):
    driver.get('/')
    driver.refresh()
    proj_select = Select(driver.find_element_by_css_selector('[name=project]'))
    proj_select.select_by_value(str(project.id))

    driver.find_element_by_id('react-tabs-4').click()
    driver.find_element_by_partial_link_text('Compute New Features').click()
    driver.find_element_by_xpath("//li[contains(text(),'General')]").click()

    amplitude = driver.find_element_by_css_selector('[name=amplitude]')
    assert amplitude.get_attribute('value') == 'true'
    driver.find_element_by_partial_link_text('Check/Uncheck All').click()
    time.sleep(0.1)
    assert amplitude.get_attribute('value') == 'false'

    driver.find_element_by_xpath("//li[contains(.,'Cadence')]").click()
    n_epochs = driver.find_element_by_css_selector('[name=n_epochs]')
    assert n_epochs.get_attribute('value') == 'true'
    driver.find_element_by_partial_link_text('Check/Uncheck All').click()
    time.sleep(0.1)
    assert n_epochs.get_attribute('value') == 'false'

    driver.find_element_by_xpath("//li[contains(.,'Lomb-Scargle')]").click()
    driver.find_element_by_partial_link_text('Check/Uncheck All').click()
    assert driver.find_element_by_css_selector(
        '[name=fold2P_slope_10percentile]').get_attribute('value') == 'false'

    featureset_name = driver.find_element_by_css_selector('[name=featuresetName]')
    featureset_name.send_keys(test_featureset_name)

    driver.find_element_by_class_name('btn-primary').click()

    driver.wait_for_xpath(
        "//div[contains(.,'At least one feature must be selected')]")
开发者ID:cesium-ml,项目名称:cesium_web,代码行数:35,代码来源:test_features.py


示例2: getHtml

def getHtml(word,driver):

    driver.get('http://www.shufazidian.com')

    elem = driver.find_element_by_name('wd')

    select = Select(driver.find_element_by_name('sort'))
    select.select_by_value('9')
    # print('1, ', ctime())
    elem.send_keys(word)
    # wait = WebDriverWait(driver,5)
    elem.send_keys(Keys.RETURN)
    # driver.implicitly_wait(5)
    # try:
    #     element = wait.until(EC.presence_of_all_elements_located((By.CSS_SELECTOR,'.mbpho')))
    #     print('3, ',ctime())
    # except Exception,e:
    #     print(e)
    # print('4, ', ctime())

    delay = 7 # seconds
    try:
        WebDriverWait(driver, delay).until(EC.presence_of_all_elements_located((By.CSS_SELECTOR,'.mbpho')))
    except TimeoutException:
        # print >>f , "TimeoutException Loading took too much time!"
        pass
    time.sleep(5)

    return driver.page_source
开发者ID:FrankHitman,项目名称:searchx,代码行数:29,代码来源:shufa_spider.py


示例3: makeselection

def makeselection():
	month = browser.find_element_by_xpath(".//a[contains(@onclick, 'jmpto1605')]")
	month.send_keys("\n")
	time.sleep(5) # delays for 5 seconds
	sectionDatesOfStay = browser.find_element_by_id('sectionDatesOfStay')
	containerDatesOfStay = sectionDatesOfStay.find_element_by_id('containerDatesOfStay')
	calCell = containerDatesOfStay.find_element_by_class_name('calCell')
	cal1 = calCell.find_element_by_id('cal1')
	calTable1605 = cal1.find_element_by_id('calTable1605')

	# Select May 28 as the arrival day
	date_28 = calTable1605.find_element_by_id('160528')
	date_28.send_keys("\n")
	time.sleep(5) # delays for 5 seconds

	# Select May 29 as the departure day
	date_29 = calTable1605.find_element_by_id('160529')
	date_29.send_keys("\n")
	time.sleep(5) # delays for 5 seconds

	# Select the adults number
	frmNumAdults = browser.find_element_by_id('frmNumAdults')
	adultNo = Select(frmNumAdults)
	adultNo.select_by_visible_text('2')

	# Check the room status
	time.sleep(5)
	suiteTypes = browser.find_element_by_id('suiteTypes')
	sendemail()
开发者ID:damechen,项目名称:auto_reserve,代码行数:29,代码来源:reserve.py


示例4: test_new_duplicates_project_name

    def test_new_duplicates_project_name(self):
        """
        Should not be able to create a new project whose name is the same
        as an existing project
       """

        project_name = "dupproject"

        Project.objects.create_project(name=project_name,
                                       release=self.release)

        url = reverse('newproject')
        self.get(url)

        self.enter_text('#new-project-name', project_name)

        select = Select(self.find('#projectversion'))
        select.select_by_value(str(self.release.pk))

        element = self.wait_until_visible('#hint-error-project-name')

        self.assertTrue(("Project names must be unique" in element.text),
                        "Did not find unique project name error message")

        # Try and click it anyway, if it submits we'll have a new project in
        # the db and assert then
        self.click("#create-project-button")

        self.assertTrue(
            (Project.objects.filter(name=project_name).count() == 1),
            "New project not found in database")
开发者ID:MentorEmbedded,项目名称:poky,代码行数:31,代码来源:test_new_project_page.py


示例5: walkProd

def walkProd():
    global driver, prevTrail
    try:
        # click overlay advertisement popup left button "No Thanks"
        try:
            driver.find_element_by_css_selector("a.btn.close.fl-left").\
                    click()
        except (NoSuchElementException):
            pass

        zpath = ('#ctl00_ctl00_ctl00_mainContent_localizedContent_bodyCenter'+
                 '_adsPanel_lbProduct')
        waitTextChanged(zpath)
        curSel = Select(css(zpath))
        numProds = len(curSel.options)
        ulog("numProds=%d"%numProds)

        startIdx = getStartIdx()
        for idx in range(startIdx, numProds):
            curSel = Select(css(zpath))
            ulog("idx=%s"%idx)
            ulog('select "%s"'%curSel.options[idx].text)
            curSel.select_by_index(idx)
            prevTrail+=[idx]
            while True:
                ret = walkFile()
                if ret != TRY_AGAIN:
                    break
            if ret== PROC_GIVE_UP:
                ulog('"%s" is GIVE UP'% curSel.options[idx].text)
            prevTrail.pop()
        return PROC_OK
    except Exception as ex:
        traceback.print_exc(); ipdb.set_trace()
        driver.save_screenshot('netgear_exc.png')
开发者ID:MikimotoH,项目名称:TPLink_Harvest,代码行数:35,代码来源:netgear_crawler.py


示例6: select_state

 def select_state(self, state):
     select = Select(self.driver.find_element(*ShippingPageLocators.STATE_DROPDOWN))
     if state==None:
         state_number = randint(0,49)
         select.select_by_index(state_number)
     else:
         select.select_by_visible_text(state)
开发者ID:paulinadao,项目名称:23andme,代码行数:7,代码来源:page.py


示例7: submit_form

 def submit_form(self, form, data, clear=True, submit=True, wait=True):
     for k, v in data.items():
         input_field = form.find_element_by_name(k)
         if input_field.tag_name in ('input', 'textarea'):
             field_type = input_field.get_attribute('type')
             if field_type == 'radio':
                 radio_button = form.find_element_by_css_selector(
                     "input[type=radio][name={}][value='{}']".format(
                         k, v
                     )
                 )
                 radio_button.click()
             elif field_type == 'checkbox':
                 checkbox_button = form.find_element_by_css_selector(
                     'input[type=checkbox][name={}]'.format(k)
                 )
                 if v and not checkbox_button.is_selected():
                     checkbox_button.click()
                 elif not v and checkbox_button.is_selected():
                     checkbox_button.click()
             elif clear and input_field.get_attribute('value'):
                 input_field.clear()
             input_field.send_keys(v)
         elif input_field.tag_name == 'select':
             select_field = Select(input_field)
             select_field.select_by_value(v)
     if submit:
         submit_btn = form.find_element_by_xpath(
             './/button[@type="submit"]')
         submit_btn.click()
     if wait:
         self.wait_for_page_load()
开发者ID:mtirsel,项目名称:django-testbox,代码行数:32,代码来源:testcase.py


示例8: _test_fxa_signup

    def _test_fxa_signup(self):
        '''FullFlow1:create, signout - %s %s %s''' % \
        (self.os, self.br, self.version)

        self.driver.get(FXA_SIGNUP)
        time.sleep(2)
        assert 'Create' in self.driver.title

        username = self.driver.find_element_by_css_selector(input_email)
        username.send_keys(self.fxa_new_user)
        time.sleep(2)
        pw = self.driver.find_element_by_css_selector(input_password)
        pw.send_keys(fxa_password)

        selectBox = Select(self.driver.find_element_by_id(coppa_locator))
        time.sleep(2)
        selectBox.select_by_visible_text("1991")

        self.driver.find_element_by_id(btn_submit).click()

        self.wait_page_load(FXA_SIGNUP)
        assert 'Confirm your account' in self.driver.title

        # verify restmail user
        time.sleep(4)
        restmail_link = getRestmailLink(self.fxa_new_user)
        self.driver.get(restmail_link)
        time.sleep(2)
        assert 'verified' in self.driver.title
开发者ID:edmoz,项目名称:services-tools,代码行数:29,代码来源:run_fxa_tests.py


示例9: test_volvox

def test_volvox():
    format_volvox()
    browser = webdriver.Firefox() # Get local session of firefox
    browser.get("file://%s/index.html?data=sample_data/json/volvox" % os.getcwd() ) # Load page

    # select "ctgA from the dropdown
    refseq_selector = Select(browser.find_element_by_id('chrom'))
    refseq_selector.select_by_value('ctgA')

    # check a good browser title
    assert "ctgA" in browser.title, "browser title is actually %s" % browser.title

    tabs = browser.find_elements_by_xpath( '//div[@class="browsingTab"]' )
    for t in tabs:
        t.click()
        time.sleep(1)
        t.click()
        time.sleep(0.5)

    assert_no_js_errors(browser)

    # do a test where we search for a certain gene using the search box
    search_f15(browser)

    assert_no_js_errors(browser)

    # test scrolling, make sure we get no js errors
    scroll(browser)

    # test dragging in and displaying the wiggle track
    wiggle(browser)

    browser.close()
    pass;
开发者ID:czhu,项目名称:jbrowse,代码行数:34,代码来源:volvox_biodb_test.py


示例10: bulkCreate

    def bulkCreate(self):
        self.log.write("namepefix id" +self.guestNamePefix)
        self.browser.find_element_by_xpath("//*[@id='guestName']").send_keys(self.guestNamePefix)
        self.browser.find_element_by_xpath("//*[@id='userProfile']").clear()
        self.log.write("guestnumber is"+self.guestNumber)
        self.browser.find_element_by_xpath("//*[@id='userProfile']").send_keys(self.guestNumber)
        self.log.write("select guest type,guest type is"+self.guestType)
        select = Select(self.browser.find_element_by_xpath("//*[@name='authType']")) 
        select.select_by_visible_text(self.guestType)
        time.sleep(2)
#         //*[@id="J-create"]
        self.log.write("click 'create'")
        self.browser.find_element_by_xpath("//a[@id='J-create']").click()
        time.sleep(2)
        self.guestinfo.append("Wi-Fi Network:")
        self.guestinfo.append(self.browser.find_element_by_xpath("//form[@id='guest-two-form']/fieldset/table/tbody/tr/td[2]/p").text)
        self.guestinfo.append("Prefix for Guest Names:")
        self.guestinfo.append(self.browser.find_element_by_xpath("//form[@id='guest-two-form']/fieldset/table/tbody/tr[2]/td[2]/p").text)
        self.guestinfo.append("Number of Guests:")
        self.guestinfo.append(self.browser.find_element_by_xpath("//form[@id='guest-two-form']/fieldset/table/tbody/tr[3]/td[2]/p").text)
        self.guestinfo.append("Access Duration:")
        self.guestinfo.append(self.browser.find_element_by_xpath("//form[@id='guest-two-form']/fieldset/table/tbody/tr[4]/td[2]/p").text)
        self.browser.find_element_by_xpath("//*[@id='deliver-name']").send_keys(self.email)
        self.log.write("click 'comfirm'")
        self.browser.find_element_by_xpath("/html/body/div/div[2]/div[2]/div[2]/div/form/fieldset[2]/table/tbody/tr[3]/td[2]/p/a").click()
        time.sleep(2)
开发者ID:gvsurenderreddy,项目名称:AerohiveAuto,代码行数:26,代码来源:guestAccount.py


示例11: createGuest

    def createGuest(self):
#         self.gotoCreateGuest(self)
#         self.browser.find_element_by_xpath("/html/body/div/div[2]/div[2]/div/div[2]/div/div/p[2]/a").click()
        time.sleep(2)
        self.log.write("guetname is "+self.guestName)
        self.browser.find_element_by_xpath("//*[@id='guestName']").send_keys(self.guestName)
        self.log.write("organization is" +self.organization)
        self.browser.find_element_by_xpath("//*[@id='organization']").send_keys(self.organization)
        self.log.write("purpose is"+self.purposeOfVisit)
        self.browser.find_element_by_xpath("//*[@id='visitPurpose']").send_keys(self.purposeOfVisit)
        self.log.write("email is "+self.email)
        self.browser.find_element_by_xpath("//*[@id='email']").send_keys(self.email)
        self.log.write("phone is" +self.phone)
        self.browser.find_element_by_xpath("//*[@id='phoneNumber']").send_keys(self.phone)
        self.log.write("the type of logname is"+self.loginName)
        self.browser.find_element_by_xpath("//input[@value='"+self.loginName+"']").click()
#         logname:email,phone,name
        self.log.write("select guesttype" +self.guestType)
        select = Select(self.browser.find_element_by_xpath("//*[@id='J-guest-type']")) 
        select.select_by_visible_text(self.guestType)
        self.log.write("click 'create'")
        self.browser.find_element_by_xpath("//*[@id='J-next']").click()
#         guestSsid=self.browser.find_elenment_by_xpath("//form[@id='new-gt-form']/fieldset[3]/table/tbody/tr[2]/td[2]/p[2]/span").text
#         self.browser.find_element_by_xpath("//form[@id='new-gt-form']/fieldset[3]/table/tbody/tr[4]/td[2]/p/a").click()
        
#         self.guestloginName=self.browser.find_element_by_xpath("/html/body/div[6]/div/div/form/fieldset/table/tbody/tr[2]/td[2]/p").text
#         self.guestpasswd=self.browser.find_element_by_xpath("/html/body/div[6]/div/div/form/fieldset/table/tbody/tr[3]/td[2]/p").text
#         self.accessTime=self.browser.find_element_by_xpath("/html/body/div[6]/div/div/form/fieldset/table/tbody/tr[4]/td[2]/p").text
#         self.sendEmail=self.browser.find_element_by_path("//*[@id='deliver-name']").text  
        time.sleep(2)
        self.log.write("click 'confirm'")
        self.browser.find_element_by_xpath("/html/body/div/div[2]/div[2]/div[2]/div/form/fieldset[2]/table/tbody/tr[3]/td[2]/p/a").click()
                                                 
#         self.browser.find_element_by_xpath("/html/body/div[6]/div/div/form/fieldset[2]/table/tbody/tr[3]/td[2]/p/a").click()
        time.sleep(2)
开发者ID:gvsurenderreddy,项目名称:AerohiveAuto,代码行数:35,代码来源:guestAccount.py


示例12: select

    def select(self, selector, value):
        from selenium.webdriver.support.ui import Select

        elem = self.selenium.find_element_by_css_selector(selector)
        select = Select(elem)

        select.select_by_visible_text(value)
开发者ID:IntersectAustralia,项目名称:asvo-tao,代码行数:7,代码来源:ithelper.py


示例13: create_csv

def create_csv(year,month):
	path = os.getcwd()+os.sep+"temp"
	profile = webdriver.FirefoxProfile()
	profile.set_preference('browser.download.folderList', 2) # custom location
	profile.set_preference('browser.download.manager.showWhenStarting', False)
	profile.set_preference('browser.download.dir', path)
	profile.set_preference('browser.helperApps.neverAsk.saveToDisk', 'text/csv')
	driver = webdriver.Firefox(profile)
	try:
		driver.get("https://www.ura.gov.sg/realEstateIIWeb/price/search.action")
		driver.implicitly_wait(5)
		select_year = Select(driver.find_element_by_name('yearSelect'))
		onchange_null  = "document.getElementById('yearSelect').onchange='';document.getElementById('monthSelect').onchange='';"
		clear_month = "$('#monthSelect').empty();"
		append_month = "$('#monthSelect').append(\"<option selected='selected' value="+str(month)+">"+str(month)+"</option>\");"  
		driver.execute_script(clear_month)
		driver.execute_script(onchange_null)
		driver.execute_script(append_month)
		select_year.select_by_visible_text(year)
		driver.execute_script("submitViewAll()")
		driver.implicitly_wait(5)
		driver.get("https://www.ura.gov.sg/realEstateIIWeb/price/submitExcelResults.action")
		print(year,month)
		driver.close()
	except:
		print("Logging missed values")
		print(year,month)
		print(sys.exc_info())
		log.append([year,month])
		driver.implicitly_wait(10)
开发者ID:gokul-propertyguru,项目名称:local-workbin,代码行数:30,代码来源:URAScrap.py


示例14: test_check_uncheck_features

def test_check_uncheck_features(driver, project, dataset):
    driver.get('/')
    driver.refresh()
    proj_select = Select(driver.find_element_by_css_selector('[name=project]'))
    proj_select.select_by_value(str(project.id))

    driver.find_element_by_id('react-tabs-4').click()
    driver.find_element_by_partial_link_text('Compute New Features').click()
    driver.find_element_by_xpath("//li[contains(text(),'General')]").click()

    amplitude = driver.find_element_by_css_selector('[name=amplitude]')
    assert amplitude.get_attribute('value') == 'true'
    driver.find_element_by_partial_link_text('Check/Uncheck All').click()
    time.sleep(0.3)
    assert amplitude.get_attribute('value') == 'false'
    driver.find_element_by_partial_link_text('Check/Uncheck All').click()
    time.sleep(0.1)
    assert amplitude.get_attribute('value') == 'true'

    driver.find_element_by_xpath("//li[contains(.,'Cadence')]").click()
    n_epochs = driver.find_element_by_css_selector('[name=n_epochs]')
    assert n_epochs.get_attribute('value') == 'true'
    driver.find_element_by_partial_link_text('Check/Uncheck All').click()
    time.sleep(0.1)
    assert n_epochs.get_attribute('value') == 'false'

    driver.find_element_by_xpath("//li[contains(.,'Lomb-Scargle')]").click()
    driver.find_element_by_partial_link_text('Check/Uncheck All').click()
    assert driver.find_element_by_css_selector(
        '[name=fold2P_slope_10percentile]').get_attribute('value') == 'false'
开发者ID:cesium-ml,项目名称:cesium_web,代码行数:30,代码来源:test_features.py


示例15: select_current_climate_layers

 def select_current_climate_layers(self, resolution, string):
     # select the correct resolution filter
     select = Select(self.driver.find_element_by_name("form.widgets.resolution:list"))
     select.select_by_visible_text(resolution)
     # Yes, there is a type here, but that's how it is on the backend
     path_string = "(//tr[@data-friendlyname='collapbsable_climatelayer_" + string + "'])"
     self.driver.find_element_by_xpath(path_string).click()
开发者ID:BCCVL,项目名称:org.bccvl.tests,代码行数:7,代码来源:experiment_sdm_page.py


示例16: select_term

 def select_term(self, term):
     d = self.driver
     d.get('https://loris.wlu.ca/ssb_prod/bwskflib.P_SelDefTerm')
     dropdown = Select(d.find_element_by_id('term_id'))
     dropdown.select_by_value(term)
     d.find_elements_by_css_selector('form')[1].submit()
     self.term_selected = True
开发者ID:glifchits,项目名称:loris-register,代码行数:7,代码来源:loris.py


示例17: boostme

def boostme(driver,NotAmped,amptype,doubledipchoice):

	if amptype=='DD':

		for k,v in NotAmped.iteritems():

			v.click()
			time.sleep(SLEEP_SECONDS)

			sele=Select(driver.find_element_by_xpath("//*[@id='secondPool']/div/div/div[2]/form/div/select"))
			dropdown_options = sele.options

			
			for available in range(0,len(dropdown_options)):
				current_option=dropdown_options[available].text

				if doubledipchoice==current_option:
					sele.select_by_visible_text(current_option)
					time.sleep(SLEEP_SECONDS)
					break
			SecondPoolDiv=driver.find_element_by_id("secondPool")

			SecondPoolDiv.find_element_by_xpath(".//button[contains(text(), 'Add Pool')]").click()

			time.sleep(SLEEP_SECONDS)
	
	elif amptype=='Boost':
		
		for k,v in NotAmped.iteritems():
			v.click()
			time.sleep(5)
开发者ID:Scootie,项目名称:ZenAmper,代码行数:31,代码来源:zenamper.py


示例18: credetials_to_edit_school

    def credetials_to_edit_school(self,
                                  driver,
                                  school_name,
                                  address,
                                  xpath_of_school_to_edit,
                                  xpath_of_director):
        """ Function to automate proccess of inserting the credentials """

        driver.find_element_by_xpath(xpath_of_school_to_edit).click()
        input_name_area = driver.find_element_by_xpath(
            self.xpaths['inputSchoolName'])
        input_address_area = driver.find_element_by_xpath(
            self.xpaths['inputSchoolAddress'])
        input_name_area.clear()
        input_name_area.send_keys(school_name)
        input_address_area.clear()
        input_address_area.send_keys(address)

        driver.find_element_by_xpath(
            xpath_of_director).click()

        select = Select(driver.find_element_by_xpath(xpath_of_director))

        select.select_by_value('12')
        driver.find_element_by_xpath(
            self.xpaths['confirmAddEditButton']).click()
开发者ID:dmitriivasiluk,项目名称:CV_code_examples,代码行数:26,代码来源:test_example_selenium.py


示例19: persistent_filter_test

    def persistent_filter_test(self):
        pla = platform_get()
        # go to test page, tab Fragility
        pla.get('/vulnerability/list?type_of_assessment=1')

        # find LLRS dropdown filter menu
        sel_tag = pla.xpath_finduniq(
            "//form[@name='filter']//select[@id='id_llrs']")
        sel = Select(sel_tag)
        sel.select_by_value("LWAL")

        # find filter button and click it
        filter = pla.xpath_finduniq(
            "//form[@name='filter']//button[@type='submit' and"
            " @value='Filter']")
        filter.click()

        # move to tab vulnerability
        pla.get('/vulnerability/list?type_of_assessment=2')
        pla.waituntil_js(10, ("try { return (window.gem_app_initialized"
                              " == true); } catch (exc) { return false; }"))


        # find again LLRS dropdown filter menu
        sel_tag = pla.xpath_finduniq(
            "//form[@name='filter']//select[@id='id_llrs']")
        sel = Select(sel_tag)

        # retrieve the selected item (that must be equal
        # to the previous selected)
        selected_item = sel.all_selected_options

        # check if the value is the same selected in the previous page
        self.assertEqual(selected_item[0].get_attribute('value'), 'LWAL')
开发者ID:gem,项目名称:oq-platform,代码行数:34,代码来源:vulnerability_test.py


示例20: fill_address

 def fill_address(self):
     try:
         wait = self.wait
         contact_page = self.contact_page
         wait.until(lambda d: contact_page.another_address_button().is_displayed(), message="brak buttona another adress")
         contact_page.another_address_button().click()
         wait.until(lambda d: len(contact_page.address_forms()) > 1)
         for i in range(2):
             contact = self.contact[i]
             wait.until(lambda d: contact_page.street_inputs()[i].is_displayed(), message="pole ulica jest niewidoczne")
             contact_page.street_inputs()[i].send_keys(contact['street'])
             wait.until(lambda d: contact_page.region_inputs()[i].is_displayed(), message="pole wojewodztwo jest niewidoczne")
             contact_page.region_inputs()[i].send_keys(contact['region'])
             wait.until(lambda d: contact_page.postcode_inputs()[i].is_displayed(), message="pole kod pocztowy jest niewidoczne")
             contact_page.postcode_inputs()[i].send_keys(contact['postcode'])
             wait.until(lambda d: contact_page.city_inputs()[i].is_displayed(), message="pole miasto jest niewidoczne")
             contact_page.city_inputs()[i].send_keys(contact['city'])
             wait.until(lambda d: contact_page.country_inputs()[i].is_displayed(), message="pole kraj jest niewidoczne")
             contact_page.country_inputs()[i].send_keys(contact['country'])
             wait.until(lambda d: contact_page.address_dropdown_menues()[i].is_displayed(), 
                 message="menu kategorii adresu nie zostalo wyswietlone")
             select = Select(contact_page.address_dropdown_menues()[i])
             select.select_by_value(contact['type'])
     except Exception:
         pytest.allure.attach(sys._getframe().f_code.co_name, self.driver.get_screenshot_as_png(), type=AttachmentType.PNG)
         raise
开发者ID:engineerjan,项目名称:webmail_tests,代码行数:26,代码来源:contactpage_actions.py



注:本文中的selenium.webdriver.support.ui.Select类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python ui.WebDriverWait类代码示例发布时间:2022-05-27
下一篇:
Python select.Select类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap