函數(shù)返回兩個(gè)及以上的值绑嘹,該怎么調(diào)用:
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('當(dāng)前關(guān)注按鈕的狀態(tài)是:{0}'.format(b))
a.click()