import os
from selenium import webdriver
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
from selenium.webdriver.firefox.options import Options
options = Options()
options.headless = True
options.add_argument('-profile')
options.add_argument('/home/qwentor/share/test/profiles/profile1')
gecko = os.path.normpath(os.path.join(os.path.dirname(__file__), 'firefox', 'geckodriver'))
binary = FirefoxBinary(r'/home/qwentor/share/test/firefox/firefox-bin')
driver = webdriver.Firefox(firefox_binary=binary, executable_path=gecko, options=options)
driver.get("https://ifconfig.co")
driver.get_screenshot_as_file('/home/qwentor/share/test/screen5.png')
driver.close()
Traceback (most recent call last):
File "testbrowser2.py", line 34, in <module>
driver = webdriver.Firefox(firefox_binary=binary, executable_path=gecko, options=options)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/firefox/webdriver.py", line 174, in __init__
keep_alive=True)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: connection refused
[25334.014869] netconsole: network logging started
[110354.630803] perf: interrupt took too long (2542 > 2500), lowering kernel.perf_event_max_sample_rate to 78500
[141673.472664] perf: interrupt took too long (3193 > 3177), lowering kernel.perf_event_max_sample_rate to 62500
[515217.254144] conntrack: generic helper won't handle protocol 47. Please consider loading the specific helper module.
[623157.826950] perf: interrupt took too long (3997 > 3991), lowering kernel.perf_event_max_sample_rate to 50000
[748534.930696] traps: python3[24559] general protection ip:56354031cede sp:7ffaf631c260 error:0[748534.930766] in python3.5[563540126000+3f0000]
[930646.538441] md: data-check of RAID array md1
[930646.538500] md: minimum _guaranteed_ speed: 1000 KB/sec/disk.
[930646.538556] md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for data-check.
[930646.538633] md: using 128k window, over a total of 523712k.
[930646.610376] md: delaying data-check of md2 until md1 has finished (they share one or more physical units)
[930648.983961] md: md1: data-check done.
[930648.989485] md: data-check of RAID array md2
[930648.989549] md: minimum _guaranteed_ speed: 1000 KB/sec/disk.
[930648.989614] md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for data-check.
[930648.989694] md: using 128k window, over a total of 232624448k.
[931820.794399] md: md2: data-check done.
traps: python3[24559] general protection ip:56354031cede sp:7ffaf631c260 error:0[748534.930766] in python3.5[563540126000+3f0000]