Skip to content

Commit 2788159

Browse files
committed
Update commands: "sbase methods" & "sbase options"
1 parent 7fe3306 commit 2788159

File tree

1 file changed

+20
-6
lines changed
  • seleniumbase/console_scripts

1 file changed

+20
-6
lines changed

seleniumbase/console_scripts/run.py

+20-6
Original file line numberDiff line numberDiff line change
@@ -717,15 +717,18 @@ def show_methods():
717717
sbm += "*.type(selector, text) => Update the field with the text.\n"
718718
sbm += "*.click(selector) => Click the element with the selector.\n"
719719
sbm += "*.click_link(link_text) => Click the link containing text.\n"
720-
sbm += "*.go_back() => Navigate back to the previous URL.\n"
720+
sbm += "*.check_if_unchecked(selector) => Check checkbox if unchecked.\n"
721+
sbm += "*.uncheck_if_checked(selector) => Uncheck checkbox if checked.\n"
721722
sbm += "*.select_option_by_text(dropdown_selector, option)\n"
722723
sbm += "*.hover_and_click(hover_selector, click_selector)\n"
723724
sbm += "*.drag_and_drop(drag_selector, drop_selector)\n"
725+
sbm += "*.choose_file(selector, file_path) => Choose a file to upload.\n"
724726
sbm += "*.get_text(selector) => Get the text from the element.\n"
725727
sbm += "*.get_current_url() => Get the URL of the current page.\n"
726728
sbm += "*.get_page_source() => Get the HTML of the current page.\n"
727729
sbm += "*.get_attribute(selector, attribute) => Get element attribute.\n"
728730
sbm += "*.get_title() => Get the title of the current page.\n"
731+
sbm += "*.go_back() => Navigate to the previous page in history.\n"
729732
sbm += "*.switch_to_frame(frame) => Switch into the iframe container.\n"
730733
sbm += "*.switch_to_default_content() => Exit all iframe containers.\n"
731734
sbm += "*.switch_to_parent_frame() => Exit from the current iframe.\n"
@@ -736,13 +739,20 @@ def show_methods():
736739
sbm += "*.switch_to_driver(driver) => Switch to the browser driver.\n"
737740
sbm += "*.switch_to_default_driver() => Switch to the original driver.\n"
738741
sbm += "*.wait_for_element(selector) => Wait until element is visible.\n"
742+
sbm += "*.wait_for_element_present(selector) => Until element in HTML.\n"
739743
sbm += "*.is_element_visible(selector) => Return element visibility.\n"
744+
sbm += "*.is_element_present(selector) => Return element is in HTML.\n"
740745
sbm += "*.is_text_visible(text, selector) => Return text visibility.\n"
746+
sbm += "*.is_checked(selector) => Return whether the box is checked.\n"
741747
sbm += "*.sleep(seconds) => Do nothing for the given amount of time.\n"
742748
sbm += "*.save_screenshot(name) => Save a screenshot in .png format.\n"
743749
sbm += "*.assert_element(selector) => Verify the element is visible.\n"
744750
sbm += "*.assert_text(text, selector) => Verify text in the element.\n"
751+
sbm += "*.assert_exact_text(text, selector) => Verify text is exact.\n"
752+
sbm += "*.assert_url(url) => Verify that the current URL is the URL.\n"
753+
sbm += "*.assert_url_contains(substring) => Verify substring in URL.\n"
745754
sbm += "*.assert_title(title) => Verify the title of the web page.\n"
755+
sbm += "*.assert_title_contains(substring) => Verify STR in title.\n"
746756
sbm += "*.assert_downloaded_file(file) => Verify file was downloaded.\n"
747757
sbm += "*.assert_no_404_errors() => Verify there are no broken links.\n"
748758
sbm += "*.assert_no_js_errors() => Verify there are no JS errors.\n"
@@ -769,15 +779,17 @@ def show_options():
769779
line = '(Some options are Chromium-specific, e.g. "--guest --mobile")'
770780
print(line)
771781
op = "\n"
772-
op += '--browser=BROWSER (The web browser to use. Default is "chrome")\n'
773-
op += "--headless (Run tests headlessly. Default mode on Linux OS.)\n"
782+
op += '--browser=BROWSER (Choice of web browser. Default is "chrome".)\n'
783+
op += "--edge / --firefox / --safari (Shortcut for browser selection.)\n"
784+
op += "--headless (Run tests headlessly. Default setting on Linux OS.)\n"
774785
op += "--demo (Slow down and visually see test actions as they occur.)\n"
775786
op += "--slow (Slow down the automation. Faster than using Demo Mode.)\n"
776787
op += "--reuse-session / --rs (Reuse browser session between tests.)\n"
788+
op += "--reuse-class-session / --rcs (RS, but for class tests only.)\n"
777789
op += "--crumbs (Clear all cookies between tests reusing a session.)\n"
778790
op += "--maximize (Start tests with the web browser window maximized.)\n"
779791
op += "--dashboard (Enable SeleniumBase's Dashboard at dashboard.html)\n"
780-
op += "--uc (Enable undetected-chromedriver to evade bot-detection.)\n"
792+
op += "--uc (Use undetected-chromedriver mode to evade bot-detection.)\n"
781793
op += "--incognito (Enable Chromium's Incognito mode.)\n"
782794
op += "--guest (Enable Chromium's Guest mode.)\n"
783795
op += "-m=MARKER (Run tests with the specified pytest marker.)\n"
@@ -794,10 +806,12 @@ def show_options():
794806
op += " | return / r: Run until method returns. j: Jump to line. |\n"
795807
op += " | where / w: Show stack spot. u: Up stack. d: Down stack. |\n"
796808
op += " | longlist / ll: See code. dir(): List namespace objects. |\n"
809+
op += "--help / -h (Display list of all available pytest options.)\n"
797810
op += "--final-debug (Enter Final Debug Mode after each test ends.)\n"
798-
op += "--recorder (Record browser actions to generate test scripts.)\n"
811+
op += "--recorder / --rec (Save browser actions as Python scripts.)\n"
812+
op += "--rec-behave / --rec-gherkin (Save actions as Gherkin code.)\n"
799813
op += "--save-screenshot (Save a screenshot at the end of each test.)\n"
800-
op += "--archive-logs (Archive old log files instead of deleting them.)\n"
814+
op += "--archive-logs (Archive logs after tests to prevent deletion.)\n"
801815
op += "--check-js (Check for JavaScript errors after page loads.)\n"
802816
op += "--start-page=URL (The browser start page when tests begin.)\n"
803817
op += "--agent=STRING (Modify the web browser's User-Agent string.)\n"

0 commit comments

Comments
 (0)