|
5 | 5 | import urllib3
|
6 | 6 | import warnings
|
7 | 7 | from selenium import webdriver
|
8 |
| -from selenium.webdriver.chrome.service import Service as Chrome_Service |
9 |
| -from selenium.webdriver.edge.service import Service as Edge_Service |
10 |
| -from selenium.webdriver.firefox.service import Service as Firefox_Service |
| 8 | +from selenium.webdriver.chrome.service import Service as ChromeService |
| 9 | +from selenium.webdriver.edge.service import Service as EdgeService |
| 10 | +from selenium.webdriver.firefox.service import Service as FirefoxService |
11 | 11 | from seleniumbase.config import settings
|
12 | 12 | from seleniumbase.core import download_helper
|
13 | 13 | from seleniumbase.core import proxy_helper
|
@@ -123,7 +123,7 @@ def _repair_chromedriver(chrome_options, headless_options):
|
123 | 123 | )
|
124 | 124 | try:
|
125 | 125 | if selenium4:
|
126 |
| - service = Chrome_Service( |
| 126 | + service = ChromeService( |
127 | 127 | executable_path=LOCAL_CHROMEDRIVER)
|
128 | 128 | driver = webdriver.Chrome(
|
129 | 129 | service=service,
|
@@ -1150,7 +1150,7 @@ def get_local_driver(
|
1150 | 1150 | else:
|
1151 | 1151 | if os.path.exists(LOCAL_GECKODRIVER):
|
1152 | 1152 | if selenium4:
|
1153 |
| - service = Firefox_Service( |
| 1153 | + service = FirefoxService( |
1154 | 1154 | executable_path=LOCAL_GECKODRIVER)
|
1155 | 1155 | return webdriver.Firefox(
|
1156 | 1156 | service=service,
|
@@ -1431,7 +1431,7 @@ def get_local_driver(
|
1431 | 1431 | edge_options.add_argument(chromium_arg_item)
|
1432 | 1432 | if selenium4:
|
1433 | 1433 | try:
|
1434 |
| - service = Edge_Service(executable_path=LOCAL_EDGEDRIVER) |
| 1434 | + service = EdgeService(executable_path=LOCAL_EDGEDRIVER) |
1435 | 1435 | driver = Edge(service=service, options=edge_options)
|
1436 | 1436 | except Exception as e:
|
1437 | 1437 | auto_upgrade_edgedriver = False
|
@@ -1459,7 +1459,7 @@ def get_local_driver(
|
1459 | 1459 | if not _was_chromedriver_repaired(): # Works for Edge
|
1460 | 1460 | _repair_edgedriver(edge_version)
|
1461 | 1461 | _mark_chromedriver_repaired() # Works for Edge
|
1462 |
| - service = Edge_Service(executable_path=LOCAL_EDGEDRIVER) |
| 1462 | + service = EdgeService(executable_path=LOCAL_EDGEDRIVER) |
1463 | 1463 | driver = Edge(service=service, options=edge_options)
|
1464 | 1464 | return driver
|
1465 | 1465 | else:
|
@@ -1636,7 +1636,7 @@ def get_local_driver(
|
1636 | 1636 | try:
|
1637 | 1637 | if os.path.exists(LOCAL_CHROMEDRIVER):
|
1638 | 1638 | if selenium4:
|
1639 |
| - service = Chrome_Service( |
| 1639 | + service = ChromeService( |
1640 | 1640 | executable_path=LOCAL_CHROMEDRIVER)
|
1641 | 1641 | driver = webdriver.Chrome(
|
1642 | 1642 | service=service,
|
@@ -1715,7 +1715,7 @@ def get_local_driver(
|
1715 | 1715 | _mark_chromedriver_repaired()
|
1716 | 1716 | if os.path.exists(LOCAL_CHROMEDRIVER):
|
1717 | 1717 | if selenium4:
|
1718 |
| - service = Chrome_Service( |
| 1718 | + service = ChromeService( |
1719 | 1719 | executable_path=LOCAL_CHROMEDRIVER)
|
1720 | 1720 | driver = webdriver.Chrome(
|
1721 | 1721 | service=service,
|
|
0 commit comments