Skip to content

Refine UC Mode and update pytest-xdist #1801

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 3 commits into from
Mar 12, 2023
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
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pytest-ordering==0.6
pytest-rerunfailures==10.3;python_version<"3.7"
pytest-rerunfailures==11.1.2;python_version>="3.7"
pytest-xdist==2.5.0;python_version<"3.7"
pytest-xdist==3.2.0;python_version>="3.7"
pytest-xdist==3.2.1;python_version>="3.7"
parameterized==0.8.1
sbvirtualdisplay==1.2.0
behave==1.2.6
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.13.12"
__version__ = "4.13.13"
11 changes: 1 addition & 10 deletions seleniumbase/fixtures/base_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -2667,10 +2667,7 @@ def __element_click(self, element):
try:
href = element.get_attribute("href")
target = element.get_attribute("target")
if len(href) > 0 and target == "_blank":
self.driver.tab_new(href)
self.switch_to_window(-1)
elif len(href) > 0:
if len(href) > 0 and target != "_blank":
element.uc_click()
else:
element.click()
Expand Down Expand Up @@ -3407,12 +3404,6 @@ def set_content_to_parent_frame(self):
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 hasattr(self.driver, "tab_new"):
self.driver.tab_new("about:blank")
if switch_to:
self.switch_to_window(-1)
time.sleep(0.01)
return
if selenium4_or_newer and switch_to:
self.driver.switch_to.new_window("tab")
else:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
'pytest-rerunfailures==10.3;python_version<"3.7"',
'pytest-rerunfailures==11.1.2;python_version>="3.7"',
'pytest-xdist==2.5.0;python_version<"3.7"',
'pytest-xdist==3.2.0;python_version>="3.7"',
'pytest-xdist==3.2.1;python_version>="3.7"',
"parameterized==0.8.1",
"sbvirtualdisplay==1.2.0",
"behave==1.2.6",
Expand Down