第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會有你想問的

為什么出現(xiàn)錯(cuò)誤 AttributeError: 'WebDriver'

為什么出現(xiàn)錯(cuò)誤 AttributeError: 'WebDriver'

阿晨1998 2021-07-17 23:06:57
獲取行 self.driver.executes_script 錯(cuò)誤self.driver.executes_script("arguments[0].click();", new_notification) AttributeError: 'WebDriver' object has no attribute 'executes_script' None但它們是一個(gè)類名import unittestfrom selenium import webdriverfrom selenium.webdriver.common.keys import Keysimport HtmlTestRunnerimport timeclass Environment(unittest.TestCase):    def setUp(self):        self.driver = webdriver.Chrome(executable_path="F:\\automation\\chromedriver.exe")    # login test case    def test_first_page_login(self):        driver = self.driver        driver.maximize_window()        driver.get("http://localhost/dashboard/user/login")        self.driver.find_element_by_id('uemail').send_keys('xyz@abc.com')        self.driver.find_element_by_id('upwd').send_keys('1234567890')        self.driver.find_element_by_id('upwd').send_keys(Keys.RETURN)    # login page going    def test_going_notification_page(self):        self.test_first_page_login()        time.sleep(5)        going_noti_page = self.driver.find_element_by_class_name('caret')        print(self.driver.execute_script("arguments[0].click();", going_noti_page))        new_notification = self.driver.find_element_by_class_name('fa-paper-plane')        self.driver.executes_script("arguments[0].click();", new_notification)        time.sleep(5)    def tearDown(self):        self.driver.quit()if __name__ == "__main__":        unittest.main(testRunner=HtmlTestRunner.HTMLTestRunner(output='F:\\automation\\reports'))
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 2174 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號