File tree Expand file tree Collapse file tree 4 files changed +13
-13
lines changed Expand file tree Collapse file tree 4 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 5
5
import re
6
6
import requests
7
7
import time
8
+ from selenium .common .exceptions import NoSuchElementException
8
9
from selenium .common .exceptions import WebDriverException
9
10
from seleniumbase import config as sb_config
10
11
from seleniumbase .common import decorators
@@ -214,8 +215,7 @@ def wait_for_css_query_selector(
214
215
if now_ms >= stop_ms :
215
216
break
216
217
time .sleep (0.1 )
217
-
218
- raise Exception (
218
+ raise NoSuchElementException (
219
219
"Element {%s} was not present after %s seconds!" % (
220
220
selector , timeout ))
221
221
Original file line number Diff line number Diff line change 23
23
import os
24
24
import sys
25
25
import time
26
+ from selenium .common .exceptions import ElementNotVisibleException
27
+ from selenium .common .exceptions import NoAlertPresentException
28
+ from selenium .common .exceptions import NoSuchElementException
29
+ from selenium .common .exceptions import NoSuchFrameException
30
+ from selenium .common .exceptions import NoSuchWindowException
26
31
from selenium .common .exceptions import StaleElementReferenceException
27
32
from selenium .common import exceptions as selenium_exceptions
28
33
from selenium .webdriver .common .by import By
29
34
from selenium .webdriver .common .action_chains import ActionChains
30
- from selenium .webdriver .remote .errorhandler import ElementNotVisibleException
31
- from selenium .webdriver .remote .errorhandler import NoSuchElementException
32
- from selenium .webdriver .remote .errorhandler import NoAlertPresentException
33
- from selenium .webdriver .remote .errorhandler import NoSuchFrameException
34
- from selenium .webdriver .remote .errorhandler import NoSuchWindowException
35
35
from seleniumbase .config import settings
36
36
from seleniumbase .fixtures import shared_utils as s_utils
37
37
ENI_Exception = selenium_exceptions .ElementNotInteractableException
Original file line number Diff line number Diff line change 2
2
This module contains shared utility methods.
3
3
"""
4
4
import time
5
- from selenium .webdriver . remote . errorhandler import ElementNotVisibleException
6
- from selenium .webdriver . remote . errorhandler import NoSuchElementException
7
- from selenium .webdriver . remote . errorhandler import NoAlertPresentException
8
- from selenium .webdriver . remote . errorhandler import NoSuchFrameException
9
- from selenium .webdriver . remote . errorhandler import NoSuchWindowException
5
+ from selenium .common . exceptions import ElementNotVisibleException
6
+ from selenium .common . exceptions import NoAlertPresentException
7
+ from selenium .common . exceptions import NoSuchElementException
8
+ from selenium .common . exceptions import NoSuchFrameException
9
+ from selenium .common . exceptions import NoSuchWindowException
10
10
from seleniumbase .common .exceptions import NoSuchFileException
11
11
from seleniumbase .common .exceptions import TimeLimitExceededException
12
12
from seleniumbase import config as sb_config
Original file line number Diff line number Diff line change 2
2
import shutil
3
3
import sys
4
4
import time
5
+ from selenium .common .exceptions import NoAlertPresentException
5
6
from selenium .common .exceptions import WebDriverException
6
- from selenium .webdriver .remote .errorhandler import NoAlertPresentException
7
7
from seleniumbase import BaseCase
8
8
from seleniumbase .core .style_sheet import style
9
9
from seleniumbase .config import settings
You can’t perform that action at this time.
0 commit comments