Skip to content

Update a method and refresh dependencies #2824

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/hack_the_planet.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ def test_all_your_base_are_belong_to_us(self):
self.set_text_content('nav a[data-text="Month"]', "BELONG")
self.set_text_content('nav a[data-text="Year"]', "TO")
self.set_text_content('nav a[data-text="Infinity"]', "US")
self.click_if_visible('button[id*="sponsorship-close-trigger"]')
self.set_text_content('aside a[class*="tful"]', aybabtu)
self.set_text_content('aside a[aria-label="Create new account"]', ayb)
self.set_text_content('aside a[aria-label="Log in"]', abtu)
Expand All @@ -117,8 +118,6 @@ def test_all_your_base_are_belong_to_us(self):
self.set_text_content(".profile-preview-card button", "SeleniumBase")
if self.is_element_visible('h2 a[href*="simonh"]'):
self.set_text_content('h2 a[href*="simonh"]', aybabtu)
self.type('input[name="q"]', aybabtu)
self.highlight('input[name="q"]', loops=4, scroll=False)
self.highlight('[aria-label="Primary sidebar"] div div', scroll=False)
self.highlight('nav a[data-text="Relevant"]', loops=1, scroll=False)
self.highlight('nav a[data-text="Latest"]', loops=1, scroll=False)
Expand All @@ -129,6 +128,7 @@ def test_all_your_base_are_belong_to_us(self):
self.highlight('nav a[data-text="Infinity"]', loops=3, scroll=False)
if self.is_element_visible('h2 a[href*="simonh"]'):
self.highlight('h2 a[href*="simonh"]', loops=7, scroll=False)
self.highlight("section.crayons-card", loops=7, scroll=False)

self.open("https://azure.microsoft.com/en-us/services/playfab/")
self.remove_elements('div[role="dialog"]')
Expand Down
4 changes: 2 additions & 2 deletions examples/raw_order_tickets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

with SB(uc=True, test=True, ad_block_on=True) as sb:
url = "https://www.thaiticketmajor.com/concert/"
sb.driver.uc_open_with_reconnect(url, 5.5)
sb.driver.uc_click("button.btn-signin", 4)
sb.driver.uc_open_with_reconnect(url, 6.111)
sb.driver.uc_click("button.btn-signin", 4.1)
sb.switch_to_frame('iframe[title*="Cloudflare"]')
sb.assert_element("div#success svg#success-icon")
sb.switch_to_default_content()
Expand Down
6 changes: 3 additions & 3 deletions mkdocs_build/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

regex>=2024.5.15
pymdown-extensions>=10.8.1
pipdeptree>=2.20.0
pipdeptree>=2.22.0
python-dateutil>=2.8.2
Markdown==3.6
markdown2==2.4.13
MarkupSafe==2.1.5
Jinja2==3.1.4
click==8.1.7
ghp-import==2.1.0
watchdog==4.0.0
watchdog==4.0.1
cairocffi==1.7.0
pathspec==0.12.1
Babel==2.15.0
Expand All @@ -20,7 +20,7 @@ lxml==5.2.2
pyquery==2.0.0
readtime==3.0.0
mkdocs==1.6.0
mkdocs-material==9.5.23
mkdocs-material==9.5.25
mkdocs-exclude-search==0.6.6
mkdocs-simple-hooks==0.1.5
mkdocs-material-extensions==1.3.1
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
pip>=24.0
packaging>=24.0
setuptools>=68.0.0;python_version<"3.8"
setuptools>=69.5.1;python_version>="3.8"
setuptools>=70.0.0;python_version>="3.8"
wheel>=0.42.0;python_version<"3.8"
wheel>=0.43.0;python_version>="3.8"
attrs>=23.2.0
certifi>=2024.2.2
certifi>=2024.6.2
exceptiongroup>=1.2.1
filelock>=3.12.2;python_version<"3.8"
filelock>=3.14.0;python_version>="3.8"
platformdirs>=4.0.0;python_version<"3.8"
platformdirs>=4.2.2;python_version>="3.8"
typing-extensions>=4.11.0;python_version>="3.8"
typing-extensions>=4.12.1;python_version>="3.8"
parse>=1.20.1
parse-type>=0.6.2
pyyaml>=6.0.1
Expand Down Expand Up @@ -42,7 +42,7 @@ pluggy==1.2.0;python_version<"3.8"
pluggy==1.5.0;python_version>="3.8"
py==1.11.0
pytest==7.4.4;python_version<"3.8"
pytest==8.2.0;python_version>="3.8"
pytest==8.2.1;python_version>="3.8"
pytest-html==2.0.1
pytest-metadata==3.0.0;python_version<"3.8"
pytest-metadata==3.1.1;python_version>="3.8"
Expand Down Expand Up @@ -73,7 +73,7 @@ rich==13.7.1
# ("pip install -r requirements.txt" also installs this, but "pip install -e ." won't.)

coverage==7.2.7;python_version<"3.8"
coverage>=7.5.1;python_version>="3.8"
coverage>=7.5.3;python_version>="3.8"
pytest-cov==4.1.0;python_version<"3.8"
pytest-cov>=5.0.0;python_version>="3.8"
flake8==5.0.4;python_version<"3.9"
Expand Down
2 changes: 1 addition & 1 deletion seleniumbase/__version__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# seleniumbase package
__version__ = "4.27.0"
__version__ = "4.27.1"
10 changes: 9 additions & 1 deletion seleniumbase/fixtures/base_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -3728,7 +3728,15 @@ def open_new_window(self, switch_to=True):
"""Opens a new browser tab/window and switches to it by default."""
self.wait_for_ready_state_complete()
if switch_to:
self.driver.switch_to.new_window("tab")
if self.undetectable:
self.driver.execute_script("window.open('data:,');")
self.switch_to_newest_window()
else:
try:
self.driver.switch_to.new_window("tab")
except Exception:
self.driver.execute_script("window.open('');")
self.switch_to_newest_window()
else:
self.driver.execute_script("window.open('');")
time.sleep(0.01)
Expand Down
14 changes: 7 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,17 +149,17 @@
'pip>=24.0',
'packaging>=24.0',
'setuptools>=68.0.0;python_version<"3.8"',
'setuptools>=69.5.1;python_version>="3.8"',
'setuptools>=70.0.0;python_version>="3.8"',
'wheel>=0.42.0;python_version<"3.8"',
'wheel>=0.43.0;python_version>="3.8"',
'attrs>=23.2.0',
"certifi>=2024.2.2",
"certifi>=2024.6.2",
"exceptiongroup>=1.2.1",
'filelock>=3.12.2;python_version<"3.8"',
'filelock>=3.14.0;python_version>="3.8"',
'platformdirs>=4.0.0;python_version<"3.8"',
'platformdirs>=4.2.2;python_version>="3.8"',
'typing-extensions>=4.11.0;python_version>="3.8"',
'typing-extensions>=4.12.1;python_version>="3.8"',
'parse>=1.20.1',
'parse-type>=0.6.2',
'pyyaml>=6.0.1',
Expand Down Expand Up @@ -188,9 +188,9 @@
'iniconfig==2.0.0',
'pluggy==1.2.0;python_version<"3.8"',
'pluggy==1.5.0;python_version>="3.8"',
"py==1.11.0",
"py==1.11.0", # Needed by pytest-html
'pytest==7.4.4;python_version<"3.8"',
'pytest==8.2.0;python_version>="3.8"',
'pytest==8.2.1;python_version>="3.8"',
"pytest-html==2.0.1", # Newer ones had issues
'pytest-metadata==3.0.0;python_version<"3.8"',
'pytest-metadata==3.1.1;python_version>="3.8"',
Expand Down Expand Up @@ -230,7 +230,7 @@
# Usage: coverage run -m pytest; coverage html; coverage report
"coverage": [
'coverage==7.2.7;python_version<"3.8"',
'coverage>=7.5.1;python_version>="3.8"',
'coverage>=7.5.3;python_version>="3.8"',
'pytest-cov==4.1.0;python_version<"3.8"',
'pytest-cov>=5.0.0;python_version>="3.8"',
],
Expand Down Expand Up @@ -292,7 +292,7 @@
"selenium-wire": [
'selenium-wire==5.1.0',
'Brotli==1.1.0',
'blinker==1.7.0',
'blinker==1.7.0', # Newer ones had issues
'h2==4.1.0',
'hpack==4.0.0',
'hyperframe==6.0.1',
Expand Down