Tôi đang sử dụng trình quản trị web selenium trong python để tự động chạy Firefox, tập lệnh python được xuất từ tiện ích bổ sung IDE selen trong Firefox. Nhưng khi tôi chạy tập lệnh, nó tăng lỗi:WebDriverException: không thể tải lỗi hồ sơ trong tập lệnh python selen
======================================================================
ERROR: test_selenium (__main__.SeleniumTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "selenium_test.py", line 8, in setUp
self.driver = webdriver.Firefox()
File "C:\Python26\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 46, in __init__
self.binary, timeout),
File "C:\Python26\lib\site-packages\selenium\webdriver\firefox\extension_connection.py", line 46,
in __init__
self.binary.launch_browser(self.profile)
File "C:\Python26\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 44, in lau
nch_browser
self._wait_until_connectable()
File "C:\Python26\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 87, in _wa
it_until_connectable
raise WebDriverException("Can't load the profile. Profile Dir : %s" % self.profile.path)
WebDriverException: Can't load the profile. Profile Dir : c:\users\ataosky\appdata\local\temp\tmpwpz
zrv
----------------------------------------------------------------------
Ran 1 test in 67.876s
FAILED (errors=1)
WebDriverException: Không thể tải cấu hình. Tiểu sử Dir: c: \ users \ ataosky \ appdata \ local \ temp \ tmpwpz
Có ai gặp phải sự cố này không? Làm thế nào để giải quyết điều này? Cảm ơn trước.
EDIE: selenium Phiên bản 2.5 đã giải quyết được sự cố này.
Chúng ta có thể xem mã? Tôi đã gặp phải các vấn đề tương tự trong C#, nhưng thực sự không thể cho bạn biết điều gì mà không thấy mã của bạn ... – Anders
+1 - cùng một vấn đề với selenium 2.9.0. Nghi ngờ nó có thể liên quan đến việc nâng cấp Firefox 8 gần đây. – hwjp