我爱编程

python3 selenium 函数返回两个及以上的值,该怎么

2018-01-09  本文已影响0人  gz_tester

函数返回两个及以上的值,该怎么调用:

def attention_course(self):
        attention_button = self.driver.find_element_by_css_selector('div.pro_share a')
        attention_attribute = attention_button.get_attribute('title')

        return attention_button, attention_attribute

def run(self):

        a, b = self.attention_course()
        print('当前关注按钮的状态是:{0}'.format(b))
        a.click()
上一篇 下一篇

猜你喜欢

热点阅读