github seleniumbase/SeleniumBase v1.52.1
Update console scripts and the dashboard

latest releases: v4.31.2, v4.31.1, v4.31.0...
3 years ago

Update console scripts and the dashboard

  • Update sbase mkdir DIR [OPTIONS] with the new -b / --basic option.
    -- This creates a new SeleniumBase folder with just config files (without example tests).
  • Fix issue with processing non-SeleniumBase dashboard entries (ones that use raw pytest).
  • Fix a dashboard issue caused by pytest-rerunfailures creating duplicate test entries.
  • Update the console output location of the dashboard path. (Display before first test runs.)
  • Update Python dependencies
    -- pygments==2.7.4;python_version>="3.5"
    -- virtualenv>=20.3.1
    -- rich==9.8.1;python_version>="3.6"
    -- allure-pytest==2.8.31;python_version>="3.5"

Type sbase options to list common pytest/SeleniumBase options:

$ sbase options

  **  pytest CLI Options  ** 

Here are some common pytest options to use with SeleniumBase:

--browser=BROWSER  (The web browser to use. Default: "chrome".)
--headless  (Run tests headlessly. Default mode on Linux OS.)
--demo  (Slow down and visually see test actions as they occur.)
--slow  (Slow down the automation. Faster than using Demo Mode.)
--reuse-session / --rs  (Reuse the browser session between tests.)
--crumbs  (Delete all cookies between tests reusing a session.)
--maximize  (Start tests with the web browser window maximized.)
--dashboard (Enable the SeleniumBase Dashboard at dashboard.html)
--incognito  (Enable Chrome's Incognito mode.)
--guest  (Enable Chrome's Guest mode.)
-m MARKER  (Run tests with the specified pytest marker.)
-n NUM  (Multithread the tests using that many threads.)
-v  (Verbose mode. Prints the full names of each test run.)
--html=report.html  (Create a detailed pytest-html report.)
--collect-only / --co  (Only show discovered tests. No run.)
--co -q  (Only show full names of discovered tests. No run.)
--trace  (Enter Debug Mode immediately after starting any test.
          n: Next line of method. s: Step through. c: Continue.)
--pdb  (Enter Debug Mode if a test fails. h: Help. c: Continue.
        where: Stacktrace location. u: Up stack. d: Down stack.
        longlist / ll: See code. dir(): List namespace objects.)
-x  (Stop running the tests after the first failure is reached.)
--archive-logs  (Archive old log files instead of deleting them.)
--save-screenshot  (Save a screenshot at the end of each test.)
--check-js  (Check for JavaScript errors after page loads.)
--start-page=URL  (The browser start page when tests begin.)
--agent=STRING  (Modify the web browser's User-Agent string.)
--mobile  (Use the mobile device emulator while running tests.)
--metrics=STRING  (Set mobile "CSSWidth,CSSHeight,PixelRatio".)
--ad-block  (Block some types of display ads after page loads.)
--settings-file=FILE  (Override default SeleniumBase settings.)
--env=ENV  (Set the test env. Access with "self.env" in tests.)
--data=DATA  (Extra test data. Access with "self.data" in tests.)
--disable-csp  (Disable the Content Security Policy of websites.)
--server=SERVER  (The Selenium Grid server/IP used for tests.)
--port=PORT  (The Selenium Grid port used by the test server.)
--proxy=SERVER:PORT  (Connect to a proxy server:port for tests.)
--proxy=USER:PASS@SERVER:PORT  (Use authenticated proxy server.)

For the full list of command-line options, type: "pytest --help".

Don't miss a new SeleniumBase release

NewReleases is sending notifications on new releases.