diff --git a/examples/setup.cfg b/examples/setup.cfg index d54514889ae..0b7ce6ffd67 100755 --- a/examples/setup.cfg +++ b/examples/setup.cfg @@ -1,9 +1,13 @@ [flake8] +# W503,W504 (line break before or after binary operators) exclude=recordings,temp +ignore=W503,W504 [nosetests] -# This is the config file for default values used during nosetest runs # nocapture=1 displays print statements from output. Undo this by using: --nologcapture # logging-level=INFO keeps the logs much cleaner than using DEBUG nocapture=1 logging-level=INFO + +[bdist_wheel] +universal=1 diff --git a/examples/wordle_test.py b/examples/wordle_test.py index 65d0ca25d51..22127b292b8 100644 --- a/examples/wordle_test.py +++ b/examples/wordle_test.py @@ -79,7 +79,7 @@ def test_wordle(self): self.click(keyboard_base + button) button = 'button[data-key="↵"]' self.click(keyboard_base + button) - self.sleep(1) # Time for the animation + self.sleep(2) # Time for the animation row = 'game-app::shadow game-row[letters="%s"]::shadow ' % word tile = row + "game-tile:nth-of-type(%s)" letter_status = [] diff --git a/requirements.txt b/requirements.txt index c7f73781ac1..63da7690b7e 100755 --- a/requirements.txt +++ b/requirements.txt @@ -51,7 +51,7 @@ filelock==3.4.1;python_version>="3.6" and python_version<"3.7" filelock==3.4.2;python_version>="3.7" fasteners==0.16;python_version<"3.5" fasteners==0.16.3;python_version>="3.5" and python_version<"3.6" -fasteners==0.17.2;python_version>="3.6" +fasteners==0.17.3;python_version>="3.6" execnet==1.9.0 pluggy==0.13.1;python_version<"3.6" pluggy==1.0.0;python_version>="3.6" @@ -129,7 +129,8 @@ pdfminer.six==20211012;python_version>="3.6" # ("pip install -r requirements.txt" also installs this, but "pip install -e ." won't.) coverage==5.5;python_version<"3.6" -coverage==6.2;python_version>="3.6" +coverage==6.2;python_version>="3.6" and python_version<"3.7" +coverage==6.3;python_version>="3.7" pytest-cov==2.12.1;python_version<"3.6" pytest-cov==3.0.0;python_version>="3.6" flake8==3.7.9;python_version<"3.5" diff --git a/seleniumbase/__version__.py b/seleniumbase/__version__.py index 341c1a98bf8..85f581ded3f 100755 --- a/seleniumbase/__version__.py +++ b/seleniumbase/__version__.py @@ -1,2 +1,2 @@ # seleniumbase package -__version__ = "2.4.1" +__version__ = "2.4.2" diff --git a/seleniumbase/core/jqc_helper.py b/seleniumbase/core/jqc_helper.py index b8b61115b04..268dc1b829a 100755 --- a/seleniumbase/core/jqc_helper.py +++ b/seleniumbase/core/jqc_helper.py @@ -240,19 +240,19 @@ def jquery_confirm_full_dialog(driver, message, buttons, options=None): },""" ) b1_html = ( - """formSubmit: { - btnClass: 'btn-%s', - text: '%s', - action: function(){ - jqc_input = this.$content.find('.jqc_input').val(); - $jqc_input = this.$content.find('.jqc_input').val(); - jconfirm.lastInputText = jqc_input; - jqc_status = '%s'; - $jqc_status = jqc_status; - jconfirm.lastButtonText = jqc_status; - } - },""" - ) + """formSubmit: { + btnClass: 'btn-%s', + text: '%s', + action: function(){ + jqc_input = this.$content.find('.jqc_input').val(); + $jqc_input = this.$content.find('.jqc_input').val(); + jconfirm.lastInputText = jqc_input; + jqc_status = '%s'; + $jqc_status = jqc_status; + jconfirm.lastButtonText = jqc_status; + } + },""" + ) one_button_trigger = "" if len(buttons) == 1: # If there's only one button, allow form submit with "Enter/Return" diff --git a/seleniumbase/fixtures/base_case.py b/seleniumbase/fixtures/base_case.py index 5470d35eeaf..a114b08c174 100755 --- a/seleniumbase/fixtures/base_case.py +++ b/seleniumbase/fixtures/base_case.py @@ -225,7 +225,7 @@ def click( self.click_partial_link_text(selector, timeout=timeout) return if self.__is_shadow_selector(selector): - self.__shadow_click(selector) + self.__shadow_click(selector, timeout) return element = page_actions.wait_for_element_visible( self.driver, selector, by, timeout=timeout @@ -500,7 +500,7 @@ def update_text( timeout = self.__get_new_timeout(timeout) selector, by = self.__recalculate_selector(selector, by) if self.__is_shadow_selector(selector): - self.__shadow_type(selector, text) + self.__shadow_type(selector, text, timeout) return element = self.wait_for_element_visible( selector, by=by, timeout=timeout @@ -577,7 +577,7 @@ def add_text(self, selector, text, by=By.CSS_SELECTOR, timeout=None): timeout = self.__get_new_timeout(timeout) selector, by = self.__recalculate_selector(selector, by) if self.__is_shadow_selector(selector): - self.__shadow_type(selector, text, clear_first=False) + self.__shadow_type(selector, text, timeout, clear_first=False) return element = self.wait_for_element_visible( selector, by=by, timeout=timeout @@ -675,7 +675,7 @@ def clear(self, selector, by=By.CSS_SELECTOR, timeout=None): timeout = self.__get_new_timeout(timeout) selector, by = self.__recalculate_selector(selector, by) if self.__is_shadow_selector(selector): - self.__shadow_clear(selector) + self.__shadow_clear(selector, timeout) return element = self.wait_for_element_visible( selector, by=by, timeout=timeout @@ -1237,7 +1237,7 @@ def get_text(self, selector, by=By.CSS_SELECTOR, timeout=None): timeout = self.__get_new_timeout(timeout) selector, by = self.__recalculate_selector(selector, by) if self.__is_shadow_selector(selector): - return self.__get_shadow_text(selector) + return self.__get_shadow_text(selector, timeout) self.wait_for_ready_state_complete() time.sleep(0.01) element = page_actions.wait_for_element_visible( @@ -1272,7 +1272,9 @@ def get_attribute( self.wait_for_ready_state_complete() time.sleep(0.01) if self.__is_shadow_selector(selector): - return self.__get_shadow_attribute(selector, attribute) + return self.__get_shadow_attribute( + selector, attribute, timeout=timeout + ) element = page_actions.wait_for_element_present( self.driver, selector, by, timeout ) @@ -3400,16 +3402,16 @@ def __process_recorded_actions(self): if ( (srt_actions[n][0] == "begin" or srt_actions[n][0] == "_url_") and n > 0 - and srt_actions[n-1][0] == "sk_op" + and srt_actions[n - 1][0] == "sk_op" ): srt_actions[n][0] = "_skip" for n in range(len(srt_actions)): if ( (srt_actions[n][0] == "begin" or srt_actions[n][0] == "_url_") and n > 1 - and srt_actions[n-1][0] == "_skip" - and srt_actions[n-2][0] == "sk_op" - and srt_actions[n][2] == srt_actions[n-1][2] + and srt_actions[n - 1][0] == "_skip" + and srt_actions[n - 2][0] == "sk_op" + and srt_actions[n][2] == srt_actions[n - 1][2] ): srt_actions[n][0] = "_skip" for n in range(len(srt_actions)): @@ -3417,17 +3419,17 @@ def __process_recorded_actions(self): (srt_actions[n][0] == "begin" or srt_actions[n][0] == "_url_") and n > 0 and ( - srt_actions[n-1][0] == "click" - or srt_actions[n-1][0] == "js_cl" - or srt_actions[n-1][0] == "js_ca" + srt_actions[n - 1][0] == "click" + or srt_actions[n - 1][0] == "js_cl" + or srt_actions[n - 1][0] == "js_ca" ) ): - url1 = srt_actions[n-1][2] + url1 = srt_actions[n - 1][2] if ( - srt_actions[n-1][0] == "js_cl" - or srt_actions[n-1][0] == "js_ca" + srt_actions[n - 1][0] == "js_cl" + or srt_actions[n - 1][0] == "js_ca" ): - url1 = srt_actions[n-1][2][0] + url1 = srt_actions[n - 1][2][0] if url1.endswith("/#/"): url1 = url1[:-3] elif url1.endswith("/"): @@ -3443,7 +3445,7 @@ def __process_recorded_actions(self): or (len(url1) > 0 and (url2.startswith(url1) or "?search" in url1) and (int(srt_actions[n][3]) - int( - srt_actions[n-1][3]) < 6500)) + srt_actions[n - 1][3]) < 6500)) ): srt_actions[n][0] = "f_url" for n in range(len(srt_actions)): @@ -3451,11 +3453,11 @@ def __process_recorded_actions(self): (srt_actions[n][0] == "begin" or srt_actions[n][0] == "_url_") and n > 0 and ( - srt_actions[n-1][0] == "begin" - or srt_actions[n-1][0] == "_url_" + srt_actions[n - 1][0] == "begin" + or srt_actions[n - 1][0] == "_url_" ) ): - url1 = srt_actions[n-1][2] + url1 = srt_actions[n - 1][2] if url1.endswith("/#/"): url1 = url1[:-3] elif url1.endswith("/"): @@ -3466,55 +3468,57 @@ def __process_recorded_actions(self): elif url2.endswith("/"): url2 = url2[:-1] if url1.replace("www.", "") == url2.replace("www.", ""): - srt_actions[n-1][0] = "_skip" + srt_actions[n - 1][0] = "_skip" elif url2.startswith(url1): srt_actions[n][0] = "f_url" for n in range(len(srt_actions)): if ( srt_actions[n][0] == "input" and n > 0 - and srt_actions[n-1][0] == "input" - and srt_actions[n-1][2] == "" + and srt_actions[n - 1][0] == "input" + and srt_actions[n - 1][2] == "" ): - srt_actions[n-1][0] = "_skip" + srt_actions[n - 1][0] = "_skip" for n in range(len(srt_actions)): if ( (srt_actions[n][0] == "begin" or srt_actions[n][0] == "_url_") and n > 0 and ( - srt_actions[n-1][0] == "click" - or srt_actions[n-1][0] == "js_cl" - or srt_actions[n-1][0] == "js_ca" - or srt_actions[n-1][0] == "input" + srt_actions[n - 1][0] == "click" + or srt_actions[n - 1][0] == "js_cl" + or srt_actions[n - 1][0] == "js_ca" + or srt_actions[n - 1][0] == "input" + ) + and ( + int(srt_actions[n][3]) - int(srt_actions[n - 1][3]) < 6500 ) - and (int(srt_actions[n][3]) - int(srt_actions[n-1][3]) < 6500) ): if ( - srt_actions[n-1][0] == "click" - or srt_actions[n-1][0] == "js_cl" - or srt_actions[n-1][0] == "js_ca" + srt_actions[n - 1][0] == "click" + or srt_actions[n - 1][0] == "js_cl" + or srt_actions[n - 1][0] == "js_ca" ): if ( - srt_actions[n-1][1].startswith("input") - or srt_actions[n-1][1].startswith("button") + srt_actions[n - 1][1].startswith("input") + or srt_actions[n - 1][1].startswith("button") ): srt_actions[n][0] = "f_url" - elif srt_actions[n-1][0] == "input": - if srt_actions[n-1][2].endswith("\n"): + elif srt_actions[n - 1][0] == "input": + if srt_actions[n - 1][2].endswith("\n"): srt_actions[n][0] = "f_url" for n in range(len(srt_actions)): if ( srt_actions[n][0] == "cho_f" and n > 0 - and srt_actions[n-1][0] == "chfil" + and srt_actions[n - 1][0] == "chfil" ): - srt_actions[n-1][0] = "_skip" - srt_actions[n][2] = srt_actions[n-1][1][1] + srt_actions[n - 1][0] = "_skip" + srt_actions[n][2] = srt_actions[n - 1][1][1] for n in range(len(srt_actions)): if ( srt_actions[n][0] == "input" and n > 0 - and srt_actions[n-1][0] == "e_mfa" + and srt_actions[n - 1][0] == "e_mfa" ): srt_actions[n][0] = "_skip" for n in range(len(srt_actions)): @@ -3522,8 +3526,8 @@ def __process_recorded_actions(self): (srt_actions[n][0] == "begin" or srt_actions[n][0] == "_url_") and n > 0 and ( - srt_actions[n-1][0] == "submi" - or srt_actions[n-1][0] == "e_mfa" + srt_actions[n - 1][0] == "submi" + or srt_actions[n - 1][0] == "e_mfa" ) ): srt_actions[n][0] = "f_url" @@ -3545,13 +3549,13 @@ def __process_recorded_actions(self): if ( srt_actions[n][0] == "click" and n > 0 - and srt_actions[n-1][0] == "ho_cl" - and srt_actions[n-1][2] in origins + and srt_actions[n - 1][0] == "ho_cl" + and srt_actions[n - 1][2] in origins ): - srt_actions[n-1][0] = "_skip" + srt_actions[n - 1][0] = "_skip" srt_actions[n][0] = "h_clk" - srt_actions[n][1] = srt_actions[n-1][1][0] - srt_actions[n][2] = srt_actions[n-1][1][1] + srt_actions[n][1] = srt_actions[n - 1][1][0] + srt_actions[n][2] = srt_actions[n - 1][1][1] for n in range(len(srt_actions)): if srt_actions[n][0] == "chfil" and srt_actions[n][2] in origins: srt_actions[n][0] = "cho_f" @@ -3561,9 +3565,9 @@ def __process_recorded_actions(self): if ( srt_actions[n][0] == "sh_fc" and n > 0 - and srt_actions[n-1][0] == "sh_fc" + and srt_actions[n - 1][0] == "sh_fc" ): - srt_actions[n-1][0] = "_skip" + srt_actions[n - 1][0] = "_skip" ext_actions = [] ext_actions.append("_url_") ext_actions.append("js_cl") @@ -3612,8 +3616,8 @@ def __process_recorded_actions(self): if ( srt_actions[n][0] == "input" and n > 0 - and srt_actions[n-1][0] == "js_ty" - and srt_actions[n][2] == srt_actions[n-1][2] + and srt_actions[n - 1][0] == "js_ty" + and srt_actions[n][2] == srt_actions[n - 1][2] ): srt_actions[n][0] = "_skip" for n in range(len(srt_actions)): @@ -5954,8 +5958,19 @@ def __get_shadow_element(self, selector, timeout=None): and self.is_chromium() and int(self.__get_major_browser_version()) >= 96 ): - element = shadow_root.find_element( - By.CSS_SELECTOR, value=selector_part) + found = False + for i in range(int(timeout) * 3): + try: + element = shadow_root.find_element( + By.CSS_SELECTOR, value=selector_part) + found = True + break + except Exception: + time.sleep(0.2) + continue + if not found: + element = shadow_root.find_element( + By.CSS_SELECTOR, value=selector_part) else: element = page_actions.wait_for_element_present( shadow_root, @@ -5985,12 +6000,12 @@ def __is_shadow_selector(self, selector): return True return False - def __shadow_click(self, selector): - element = self.__get_shadow_element(selector) + def __shadow_click(self, selector, timeout): + element = self.__get_shadow_element(selector, timeout=timeout) element.click() - def __shadow_type(self, selector, text, clear_first=True): - element = self.__get_shadow_element(selector) + def __shadow_type(self, selector, text, timeout, clear_first=True): + element = self.__get_shadow_element(selector, timeout=timeout) if clear_first: try: element.clear() @@ -6010,8 +6025,8 @@ def __shadow_type(self, selector, text, clear_first=True): if settings.WAIT_FOR_RSC_ON_PAGE_LOADS: self.wait_for_ready_state_complete() - def __shadow_clear(self, selector): - element = self.__get_shadow_element(selector) + def __shadow_clear(self, selector, timeout): + element = self.__get_shadow_element(selector, timeout=timeout) try: element.clear() backspaces = Keys.BACK_SPACE * 42 # Autofill Defense @@ -6019,20 +6034,22 @@ def __shadow_clear(self, selector): except Exception: pass - def __get_shadow_text(self, selector): - element = self.__get_shadow_element(selector) + def __get_shadow_text(self, selector, timeout): + element = self.__get_shadow_element(selector, timeout=timeout) return element.text - def __get_shadow_attribute(self, selector, attribute): - element = self.__get_shadow_element(selector) + def __get_shadow_attribute(self, selector, attribute, timeout): + element = self.__get_shadow_element(selector, timeout=timeout) return element.get_attribute(attribute) - def __wait_for_shadow_text_visible(self, text, selector): + def __wait_for_shadow_text_visible(self, text, selector, timeout): start_ms = time.time() * 1000.0 stop_ms = start_ms + (settings.SMALL_TIMEOUT * 1000.0) for x in range(int(settings.SMALL_TIMEOUT * 10)): try: - actual_text = self.__get_shadow_text(selector).strip() + actual_text = self.__get_shadow_text( + selector, timeout=1 + ).strip() text = text.strip() if text not in actual_text: msg = ( @@ -6048,7 +6065,7 @@ def __wait_for_shadow_text_visible(self, text, selector): if now_ms >= stop_ms: break time.sleep(0.1) - actual_text = self.__get_shadow_text(selector).strip() + actual_text = self.__get_shadow_text(selector, timeout=1).strip() text = text.strip() if text not in actual_text: msg = "Expected text {%s} in element {%s} was not visible!" % ( @@ -6058,12 +6075,14 @@ def __wait_for_shadow_text_visible(self, text, selector): page_actions.timeout_exception("ElementNotVisibleException", msg) return True - def __wait_for_exact_shadow_text_visible(self, text, selector): + def __wait_for_exact_shadow_text_visible(self, text, selector, timeout): start_ms = time.time() * 1000.0 stop_ms = start_ms + (settings.SMALL_TIMEOUT * 1000.0) for x in range(int(settings.SMALL_TIMEOUT * 10)): try: - actual_text = self.__get_shadow_text(selector).strip() + actual_text = self.__get_shadow_text( + selector, timeout=1 + ).strip() text = text.strip() if text != actual_text: msg = ( @@ -6079,7 +6098,7 @@ def __wait_for_exact_shadow_text_visible(self, text, selector): if now_ms >= stop_ms: break time.sleep(0.1) - actual_text = self.__get_shadow_text(selector).strip() + actual_text = self.__get_shadow_text(selector, timeout=1).strip() text = text.strip() if text != actual_text: msg = ( @@ -6089,8 +6108,8 @@ def __wait_for_exact_shadow_text_visible(self, text, selector): page_actions.timeout_exception("ElementNotVisibleException", msg) return True - def __assert_shadow_text_visible(self, text, selector): - self.__wait_for_shadow_text_visible(text, selector) + def __assert_shadow_text_visible(self, text, selector, timeout): + self.__wait_for_shadow_text_visible(text, selector, timeout) if self.demo_mode: a_t = "ASSERT TEXT" i_n = "in" @@ -6115,8 +6134,8 @@ def __assert_shadow_text_visible(self, text, selector): except Exception: pass - def __assert_exact_shadow_text_visible(self, text, selector): - self.__wait_for_exact_shadow_text_visible(text, selector) + def __assert_exact_shadow_text_visible(self, text, selector, timeout): + self.__wait_for_exact_shadow_text_visible(text, selector, timeout) if self.demo_mode: a_t = "ASSERT EXACT TEXT" i_n = "in" @@ -6185,12 +6204,12 @@ def __is_shadow_attribute_present(self, selector, attribute, value=None): except Exception: return False - def __wait_for_shadow_element_present(self, selector): - element = self.__get_shadow_element(selector) + def __wait_for_shadow_element_present(self, selector, timeout): + element = self.__get_shadow_element(selector, timeout=timeout) return element - def __wait_for_shadow_element_visible(self, selector): - element = self.__get_shadow_element(selector) + def __wait_for_shadow_element_visible(self, selector, timeout): + element = self.__get_shadow_element(selector, timeout=timeout) if not element.is_displayed(): msg = "Shadow DOM Element {%s} was not visible!" % selector page_actions.timeout_exception("NoSuchElementException", msg) @@ -6495,7 +6514,9 @@ def wait_for_element_visible( timeout = self.__get_new_timeout(timeout) selector, by = self.__recalculate_selector(selector, by) if self.__is_shadow_selector(selector): - return self.__wait_for_shadow_element_visible(selector) + return self.__wait_for_shadow_element_visible( + selector, timeout + ) return page_actions.wait_for_element_visible( self.driver, selector, by, timeout ) @@ -8498,13 +8519,13 @@ def get_jqc_button_input(self, message, buttons, options=None): new_buttons = [] for button in buttons: if ( - (type(button) is list or type(button) is tuple) and ( - len(button) == 1) + (type(button) is list or type(button) is tuple) + and (len(button) == 1) ): new_buttons.append(button[0]) elif ( - (type(button) is list or type(button) is tuple) and ( - len(button) > 1) + (type(button) is list or type(button) is tuple) + and (len(button) > 1) ): new_buttons.append((button[0], str(button[1]).lower())) else: @@ -8568,13 +8589,13 @@ def get_jqc_text_input(self, message, button=None, options=None): raise Exception('Expecting a string for arg: "message"!') if button: if ( - (type(button) is list or type(button) is tuple) and ( - len(button) == 1) + (type(button) is list or type(button) is tuple) + and (len(button) == 1) ): button = (str(button[0]), "") elif ( - (type(button) is list or type(button) is tuple) and ( - len(button) > 1) + (type(button) is list or type(button) is tuple) + and (len(button) > 1) ): valid_colors = [ "blue", @@ -8660,13 +8681,13 @@ def get_jqc_form_inputs(self, message, buttons, options=None): new_buttons = [] for button in buttons: if ( - (type(button) is list or type(button) is tuple) and ( - len(button) == 1) + (type(button) is list or type(button) is tuple) + and (len(button) == 1) ): new_buttons.append(button[0]) elif ( - (type(button) is list or type(button) is tuple) and ( - len(button) > 1) + (type(button) is list or type(button) is tuple) + and (len(button) > 1) ): new_buttons.append((button[0], str(button[1]).lower())) else: @@ -8937,7 +8958,9 @@ def wait_for_element_present( timeout = self.__get_new_timeout(timeout) selector, by = self.__recalculate_selector(selector, by) if self.__is_shadow_selector(selector): - return self.__wait_for_shadow_element_present(selector) + return self.__wait_for_shadow_element_present( + selector, timeout + ) return page_actions.wait_for_element_present( self.driver, selector, by, timeout ) @@ -8952,7 +8975,9 @@ def wait_for_element(self, selector, by=By.CSS_SELECTOR, timeout=None): timeout = self.__get_new_timeout(timeout) selector, by = self.__recalculate_selector(selector, by) if self.__is_shadow_selector(selector): - return self.__wait_for_shadow_element_visible(selector) + return self.__wait_for_shadow_element_visible( + selector, timeout + ) return page_actions.wait_for_element_visible( self.driver, selector, by, timeout ) @@ -9184,7 +9209,9 @@ def wait_for_text_visible( timeout = self.__get_new_timeout(timeout) selector, by = self.__recalculate_selector(selector, by) if self.__is_shadow_selector(selector): - return self.__wait_for_shadow_text_visible(text, selector) + return self.__wait_for_shadow_text_visible( + text, selector, timeout + ) return page_actions.wait_for_text_visible( self.driver, text, selector, by, timeout ) @@ -9199,7 +9226,9 @@ def wait_for_exact_text_visible( timeout = self.__get_new_timeout(timeout) selector, by = self.__recalculate_selector(selector, by) if self.__is_shadow_selector(selector): - return self.__wait_for_exact_shadow_text_visible(text, selector) + return self.__wait_for_exact_shadow_text_visible( + text, selector, timeout + ) return page_actions.wait_for_exact_text_visible( self.driver, text, selector, by, timeout ) @@ -9255,7 +9284,7 @@ def assert_text( timeout = self.__get_new_timeout(timeout) selector, by = self.__recalculate_selector(selector, by) if self.__is_shadow_selector(selector): - self.__assert_shadow_text_visible(text, selector) + self.__assert_shadow_text_visible(text, selector, timeout) return True self.wait_for_text_visible(text, selector, by=by, timeout=timeout) if self.demo_mode: @@ -9301,7 +9330,7 @@ def assert_exact_text( timeout = self.__get_new_timeout(timeout) selector, by = self.__recalculate_selector(selector, by) if self.__is_shadow_selector(selector): - self.__assert_exact_shadow_text_visible(text, selector) + self.__assert_exact_shadow_text_visible(text, selector, timeout) return True self.wait_for_exact_text_visible( text, selector, by=by, timeout=timeout diff --git a/seleniumbase/plugins/pytest_plugin.py b/seleniumbase/plugins/pytest_plugin.py index 854448026f1..5f256483c64 100644 --- a/seleniumbase/plugins/pytest_plugin.py +++ b/seleniumbase/plugins/pytest_plugin.py @@ -532,7 +532,7 @@ def pytest_addoption(parser): When using "--xvfb", the "--headless" option will no longer be enabled by default on Linux. Default: False. (Linux-ONLY!)""", - ) + ) parser.addoption( "--locale_code", "--locale-code", diff --git a/setup.cfg b/setup.cfg index 518e500f7f9..0b7ce6ffd67 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,13 +1,13 @@ [flake8] +# W503,W504 (line break before or after binary operators) exclude=recordings,temp +ignore=W503,W504 [nosetests] -# This is the config file for default values used during nosetest runs # nocapture=1 displays print statements from output. Undo this by using: --nologcapture # logging-level=INFO keeps the logs much cleaner than using DEBUG nocapture=1 logging-level=INFO [bdist_wheel] -# SeleniumBase works for both Python 2.7+ and Python 3.5+ universal=1 diff --git a/setup.py b/setup.py index ce6e75ce371..31e0bd4a662 100755 --- a/setup.py +++ b/setup.py @@ -176,7 +176,7 @@ 'filelock==3.4.2;python_version>="3.7"', 'fasteners==0.16;python_version<"3.5"', 'fasteners==0.16.3;python_version>="3.5" and python_version<"3.6"', - 'fasteners==0.17.2;python_version>="3.6"', + 'fasteners==0.17.3;python_version>="3.6"', "execnet==1.9.0", 'pluggy==0.13.1;python_version<"3.6"', 'pluggy==1.0.0;python_version>="3.6"', @@ -254,7 +254,8 @@ # pip install -e .[coverage] "coverage": [ 'coverage==5.5;python_version<"3.6"', - 'coverage==6.2;python_version>="3.6"', + 'coverage==6.2;python_version>="3.6" and python_version<"3.7"', + 'coverage==6.3;python_version>="3.7"', 'pytest-cov==2.12.1;python_version<"3.6"', 'pytest-cov==3.0.0;python_version>="3.6"', ],