Skip to content

Commit 3529dcf

Browse files
committed
Merge to main
1 parent 672a5bb commit 3529dcf

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

botcity/web/bot.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,8 @@ def check_driver():
254254
self.capabilities = cap
255255
driver_path = self.driver_path or check_driver()
256256
self.driver_path = driver_path
257-
if BROWSER_CONFIGS.get(self.browser).get("driver") == "msedgedriver":
258-
self._driver = driver_class(options=opt, capabilities=cap, executable_path=driver_path)
259-
else:
260-
self._driver = driver_class(options=opt, desired_capabilities=cap, executable_path=driver_path)
257+
258+
self._driver = driver_class(options=opt, desired_capabilities=cap, executable_path=driver_path)
261259
self.set_screen_resolution()
262260

263261
def stop_browser(self):
@@ -1365,14 +1363,14 @@ def mouse_move(self, x, y):
13651363
if self.browser == Browser.FIREFOX:
13661364
# Reset coordinates if the page has gone stale. Only required for Firefox
13671365
if self._html_elem is None:
1368-
self._html_elem = self._driver.find_element(By.TAG_NAME, 'body')
1366+
self._html_elem = self._driver.find_element_by_tag_name('body')
13691367
self._x = 0
13701368
self._y = 0
13711369
else:
13721370
try:
13731371
self._html_elem.is_enabled()
13741372
except StaleElementReferenceException:
1375-
self._html_elem = self._driver.find_element(By.NAME, 'body')
1373+
self._html_elem = self._driver.find_element_by_tag_name('body')
13761374
self._x = 0
13771375
self._y = 0
13781376

0 commit comments

Comments
 (0)