web_scrapper.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:pizza_math 作者: NicholasARossi 项目源码 文件源码
def select_state_option(self, value, dowait=True):
        '''
        Select state value from dropdown. Wait until district dropdown
        has loaded before returning.
        '''
        #path = '//select[@id="variation-tablepress-32"]'
        path = '//select[@id="variation-tablepress-31"]'
        district_select_elem = self.driver.find_element_by_xpath(path)

        def district_select_updated(driver):
            try:
                district_select_elem.text
            except StaleElementReferenceException:
                return True
            except:
                pass

            return False

        state_select = self.get_state_select()
        state_select.select_by_value(value)

        return self.get_state_select()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号