a
    7ñ»j«Å ã                   @   sN  d Z ddlZddlZddlZddlZddlZddlmZ ddlm	Z
 ddlmZ ddlmZ ddlmZ ddlmZ dd	lmZ e ¡ Zd
ZejdkršdZejjZejZdZdgZdd„ Zdd„ Zdd„ Zdd„ Z dd„ Z!dd„ Z"dd„ Z#dd„ Z$dd„ Z%d d!„ Z&d"d#„ Z'd$d%„ Z(d&d'„ Z)d(d)„ Z*d*d+„ Z+e ,¡ d,d-„ ƒZ-ej.j/d.d/„ ƒZ0dS )0z?This is the pytest configuration file for setting test options.é    N)Úsuppress)Úconfig)Úsettings)Údetect_b_ver)Ú
log_helper)Ú	constants)Úshared_utilsF)é   é   TZpytesterc                 C   sº  d}d}d}d}dt jvrRtjjtjj }tjjtjj }tjjtjj	 }tj
j}d}| d|d | d | ¡}|| d | d | }|  d|¡} | jdd	d
tjtjjtjjdd� | jdddddd� | jdddddd� | jdddddd� | jdddddd� | jdddddd� | jddd dd!d� | jd"dd#dd$d� | jd%dd&dd'd� | jd(dd)dd*d� | jd+dd,dd-d� | jd.dd/dd0d� | jd1dd2dd3d� | jd4dd5d6d7d� | jd8d	d9tjtjjtjjtjjtjjtjjtjjtjjtjjtjjtjj tjj!tjj"tjj#tjj$tjj%tjj&tjj'tjj(tjj)tjj*tjj+tjj,tjj-tjj.ftjj*d:d� | jd;d<d=d>d?� | jd@dAd=dBd?� | jdCdDd=dBd?� | jdEdFd=dBd?� | jdGdHd=dBd?� | jdIdJd=dKd?� | jdLdMdNd=dOd?� | jdPdQdRd=dSd?� | jdTdUdVd	dWd=dXd� | jdYdZd[d=d\d?� | jd]d^dd_d6d`d� | jdadbdctj/j0dd ded?� | jdfdgddhddid� | jdjdkddlddmd� | jdndodpddqddrd� | jdsdtduddvddwd� | jdxdyddzdd{d� | jd|d}d	d~tjjtjjtjjtjjtjjtjjtjjtjjtjjtjj tjj!tjj"tjj#tjj$tjj%tjj&tjj'tjj(tjj)tjj*tjj+tjj,tjj-tjj.ftjj*dd€� | jd�d‚ddƒdd„d� | jd…d†dd‡ddˆd� | jd‰dŠdd‹ddŒd� | jd�dŽdd�dd�d� | jd‘d	d’tj1j2tj1j3ftj1j2d“d€� | jd”d	d•d–d—d� | jd˜d	d™dšd›d� | jdœd�džd	dŸd=d d� | jd¡d¢d	d£d=d¤d� | jd¥d¦d	d§d=d¨d� | jd©dªdd«dd¬d� | jd­d®dd¯dd°d� | jd±d²d³d	d´d=dµd� | jd¶d·d¸dd¹ddºd� | jd»d¼d½d	d¾d=d¿d� | jdÀdÁd	dÂd=dÃd� | jdÄdÅd	dÆd=dÇd� | jdÈdÉd	dÊd=dËd� | jdÌdÍdÎd	dÏd=dÐd� | jdÑdÒd	dÓd=dÔd� | jdÕdÖd	d×d=dØd� | jdÙdÚdÛd	dÜd=dÝd� | jdÞdßd	dàd=dád� | jdâdãdäd	dåtjtj4j5tj4j6tj4j7fd=dæd�	 | jdçddèddéd� | jdêddëddìd� | jdíddîddïd� | jdðdñddòddód� | jdôddõddöd� | jd÷død	dùd=dúd� | jdûdüdýd	dþd=dÿd� | j�d d	�dd=�dd� | j�d�d�dd	�dd=�dd� | j�d�d	d�d
d6�dd� | j�d�dd�dd�dd� | j�d�d�dd	�dd=�dd� | j�d�d�d�dd�dd�dd� | j�d�d�dd�dd�dd� | j�d �d!d	�d"d=�d#d� | j�d$d	�d%d=�d&d� | j�d'�d(d	�d)d=�d*d� | j�d+�d,d�d-d�d.d� | j�d/�d0�d1�d2�d3d�d4d�d5d�	 | j�d6�d7d	�d8d=�d9d� | j�d:�d;d�d<d�d=d� | j�d>�d?d�d@d�dAd� | j�dB�dCd	�dDd=�dEd� | j�dF�dG�dHd�dId�dJd� | j�dK�dL�dM�dNd�dOd�dPd� | j�dQ�dRd�dSd�dTd� | j�dU�dVd�dWd�dXd� | j�dYd�dZd�d[d� | j�d\�d]d�d^d�d_d� | j�d`�dad�dbd�dcd� | j�dd�de�df�dg�dhd�did�djd�	 | j�dk�dl�dm�dnd�dod�dpd� | j�dq�dr�dsd�dtd�dud� | j�dv�dwd�dxd�dyd� | j�dz�d{�d|d�d}d�d~d� | j�d�d€�d�d�d‚d�dƒd� | j�d„�d…�d†d�d‡d=�dˆd� | j�d‰�dŠ�d‹d�dŒd=�d�d� | j�dŽ�d�d�d�d�d‘d� | j�d’�d“d�d”d�d•d� | j�d–�d—�d˜�d™d�dšd=�d›d� | j�dœ�d��dž�dŸd�d d�d¡d� | j�d¢�d£�d¤�d¥d�d¦d�d§d� | j�d¨d�d©d�dªd� | j�d«�d¬�d­d=�d®d?� | j�d¯�d°d�d±d�d²d� | j�d³d�d´d�dµd� | j�d¶�d·�d¸d�d¹d�dºd� | j�d»�d¼�d½d�d¾d�d¿d� | j�dÀ�dÁ�dÂd�dÃd�dÄd� | j�dÅ�dÆ�dÇd�dÈd�dÉd� | j�dÊ�dË�dÌd�dÍd�dÎd� | j�dÏ�dÐ�dÑd�dÒd�dÓd� | j�dÔd�dÕd�dÖd� | j�d×�dØd�dÙd�dÚd� | j�dÛ�dÜd	�dÝd=�dÞd� | j�dß�dàd	�dád=�dâd� | j�dã�dä�då�dæd�dçd�dèd� | j�dé�dê�dë�dìd�díd�dîd� | j�dï�dð�dñd�dòd�dód� | j�dô�dõd�död�d÷d� | j�død�dùd�dúd� | j�dû�düd�dýd�dþd� | j�dÿ�d d	�dd=�dd� | j�d�d�dd�dd�dd� d 8t9¡}d=t:_;d=t:_<d=t:_=g t:_>d}t9D ]}|�dv �rÄd6}�qÄt9D ]}�d	|v �ràt?�d
ƒ‚�qà�dt9v �r �d¨t9v �r t?�dƒ‚�dt9v �rN�dÊt9v �sD�dÌt9v �rNt?�dƒ‚�dKt9v �sr�dLt9v �sr�dMt9v �r �dt9v �s–�d|v �s–�dt9v �r t?�dƒ‚d}	�dKt9v �sÈ�dLt9v �sÈ�dMt9v �rÌd6}	�d}
d=}d=}g }�dt9v �sö�dt9v �r|
�d7 }
�d}| @�d¡ �dt9v �s*�dt9v �rF|
�d7 }
�d}| @�d¡ �dt9v �s^�dt9v �rz|
�d7 }
�d}| @�d¡ �dt9v �s’�dt9v �r®|
�d7 }
�d}| @�d¡ �d t9v �sÆ�d!t9v �râ|
�d7 }
�d"}| @�d ¡ �d#t9v �sú�d$t9v �r|
�d7 }
�d%}| @�d#¡ �d&t9v �s.�d't9v �r€|�s€tA B�d(¡}tCjD E|¡�r€|
�d7 }
�d(}�d(t:_;�d(t:_<|t:_=| @�d&¡ �d)t9v �s˜�d*t9v �rê|�sêtA B�d+¡}tCjD E|¡�rê|
�d7 }
�d+}�d+t:_;�d+t:_<|t:_=| @�d)¡ �d,t9v �s�d-t9v �rT|�sTtA B�d.¡}tCjD E|¡�rT|
�d7 }
�d.}�d.t:_;�d.t:_<|t:_=| @�d,¡ �d/t9v �sl�d0t9v �r¾|�s¾tA B�d1¡}tCjD E|¡�r¾|
�d7 }
�d1}�d1t:_;�d1t:_<|t:_=| @�d/¡ |}dt9v �rú|�dk�sú|
�d7 }
�d}�dt:_;| @d¡ dt9v �r2|�dk�s2|
�d7 }
�d}�dt:_;| @d¡ dt9v �rj|�dk�sj|
�d7 }
�d}�dt:_;| @d¡ dt9v �r¢|�d"k�s¢|
�d7 }
�d"}�d"t:_;| @d¡ dt9v �rÚ|�dk�sÚ|
�d7 }
�d}�dt:_;| @d¡ dt9v �r@|�d(k�s@|�s@tA B�d(¡}tCjD E|¡�r@|
�d7 }
�d(}�d(t:_;�d(t:_<|t:_=| @d¡ d"t9v �r¦|�d+k�s¦|�s¦tA B�d+¡}tCjD E|¡�r¦|
�d7 }
�d+}�d+t:_;�d+t:_<|t:_=| @d"¡ d%t9v �r|�d.k�s|�stA B�d.¡}tCjD E|¡�r|
�d7 }
�d.}�d.t:_;�d.t:_<|t:_=| @d%¡ d(t9v �rr|�d1k�sr|�srtA B�d1¡}tCjD E|¡�rr|
�d7 }
�d1}�d1t:_;�d1t:_<|t:_=| @d(¡ |
�dk�rº�d2}|�d3|
�d4 8|¡f 7 }|�d57 }|�d67 }t?|ƒ‚|	�rð|
�dk�rð|�d7v�rð�d8|�d  }t?|ƒ‚d}�dt9v �s`�d€t9v �s`�d�t9v �s`�d…t9v �s`�d„t9v �s`�d†t9v �s`�dŠt9v �s`�d‰t9v �s`�d‹t9v �rdd6}|
�dk�rš|�d9v�rš|�rš�d:|�d  }t?|ƒ‚|�r¶�døt9v �r¶t?�d;ƒ‚d=S (<  a  This plugin adds the following command-line options to pytest:
    --browser=BROWSER  (The web browser to use. Default: "chrome".)
    --chrome  (Shortcut for "--browser=chrome". Default.)
    --edge  (Shortcut for "--browser=edge".)
    --firefox  (Shortcut for "--browser=firefox".)
    --safari  (Shortcut for "--browser=safari".)
    --opera  (Shortcut for "--browser=opera".)
    --brave  (Shortcut for "--browser=brave".)
    --comet  (Shortcut for "--browser=comet".)
    --atlas  (Shortcut for "--browser=atlas".)
    --use-chromium  (Shortcut for using base `Chromium`)
    --cft  (Shortcut for using `Chrome for Testing`)
    --chs  (Shortcut for using `Chrome-Headless-Shell`)
    --settings-file=FILE  (Override default SeleniumBase settings.)
    --env=ENV  (Set the test env. Access with "self.env" in tests.)
    --account=STR  (Set account. Access with "self.account" in tests.)
    --data=STRING  (Extra test data. Access with "self.data" in tests.)
    --var1=STRING  (Extra test data. Access with "self.var1" in tests.)
    --var2=STRING  (Extra test data. Access with "self.var2" in tests.)
    --var3=STRING  (Extra test data. Access with "self.var3" in tests.)
    --variables=DICT  (Extra test data. Access with "self.variables".)
    --user-data-dir=DIR  (Set the Chrome user data directory to use.)
    --protocol=PROTOCOL  (The Selenium Grid protocol: http|https.)
    --server=SERVER  (The Selenium Grid server/IP used for tests.)
    --port=PORT  (The Selenium Grid port used by the test server.)
    --cap-file=FILE  (The web browser's desired capabilities to use.)
    --cap-string=STRING  (The web browser's desired capabilities to use.)
    --proxy=SERVER:PORT  (Connect to a proxy server:port as tests are running)
    --proxy=USERNAME:PASSWORD@SERVER:PORT  (Use an authenticated proxy server)
    --proxy-bypass-list=STRING (";"-separated hosts to bypass, Eg "*.foo.com")
    --proxy-pac-url=URL  (Connect to a proxy server using a PAC_URL.pac file.)
    --proxy-pac-url=USERNAME:PASSWORD@URL  (Authenticated proxy with PAC URL.)
    --proxy-driver  (If a driver download is needed, will use: --proxy=PROXY.)
    --multi-proxy  (Allow multiple authenticated proxies when multi-threaded.)
    --agent=STRING  (Modify the web browser's User-Agent string.)
    --mobile  (Use the mobile device emulator while running tests.)
    --metrics=STRING  (Set mobile metrics: "CSSWidth,CSSHeight,PixelRatio".)
    --chromium-arg="ARG=N,ARG2" (Set Chromium args, ","-separated, no spaces.)
    --firefox-arg="ARG=N,ARG2" (Set Firefox args, comma-separated, no spaces.)
    --firefox-pref=SET  (Set a Firefox preference:value set, comma-separated.)
    --extension-zip=ZIP  (Load a Chrome Extension .zip|.crx, comma-separated.)
    --extension-dir=DIR  (Load a Chrome Extension directory, comma-separated.)
    --disable-features="F1,F2" (Disable features, comma-separated, no spaces.)
    --binary-location=PATH  (Set path of the Chromium browser binary to use.)
    --driver-version=VER  (Set the chromedriver or uc_driver version to use.)
    --sjw  (Skip JS Waits for readyState to be "complete" or Angular to load.)
    --wfa  (Wait for AngularJS to be done loading after specific web actions.)
    --pls=PLS  (Set pageLoadStrategy on Chrome: "normal", "eager", or "none".)
    --headless  (The default headless mode. Linux uses this mode by default.)
    --headless1  (Use Chrome's old headless mode. Fast, but has limitations.)
    --headless2  (Use Chrome's new headless mode, which supports extensions.)
    --headed  (Run tests in headed/GUI mode on Linux OS, where not default.)
    --xvfb  (Run tests using the Xvfb virtual display server on Linux OS.)
    --xvfb-metrics=STRING  (Set Xvfb display size on Linux: "Width,Height".)
    --locale=LOCALE_CODE  (Set the Language Locale Code for the web browser.)
    --interval=SECONDS  (The autoplay interval for presentations & tour steps)
    --start-page=URL  (The starting URL for the web browser when tests begin.)
    --archive-logs  (Archive existing log files instead of deleting them.)
    --archive-downloads  (Archive old downloads instead of deleting them.)
    --time-limit=SECONDS  (Safely fail any test that exceeds the time limit.)
    --slow  (Slow down the automation. Faster than using Demo Mode.)
    --demo  (Slow down and visually see test actions as they occur.)
    --demo-sleep=SECONDS  (Set the wait time after Slow & Demo Mode actions.)
    --highlights=NUM  (Number of highlight animations for Demo Mode actions.)
    --message-duration=SECONDS  (The time length for Messenger alerts.)
    --check-js  (Check for JavaScript errors after page loads.)
    --ad-block  (Block some types of display ads from loading.)
    --host-resolver-rules=RULES  (Set host-resolver-rules, comma-separated.)
    --block-images  (Block images from loading during tests.)
    --do-not-track  (Indicate to websites that you don't want to be tracked.)
    --verify-delay=SECONDS  (The delay before MasterQA verification checks.)
    --ee / --esc-end  (Lets the user end the current test via the ESC key.)
    --recorder  (Enables the Recorder for turning browser actions into code.)
    --rec-behave  (Same as Recorder Mode, but also generates behave-gherkin.)
    --rec-sleep  (If the Recorder is enabled, also records self.sleep calls.)
    --rec-print  (If the Recorder is enabled, prints output after tests end.)
    --disable-cookies  (Disable Cookies on websites. Pages might break!)
    --disable-js  (Disable JavaScript on websites. Pages might break!)
    --disable-csp  (Disable the Content Security Policy of websites.)
    --disable-ws  (Disable Web Security on Chromium-based browsers.)
    --enable-ws  (Enable Web Security on Chromium-based browsers.)
    --enable-sync  (Enable "Chrome Sync" on websites.)
    --uc | --undetected  (Use undetected-chromedriver to evade bot-detection.)
    --uc-cdp-events  (Capture CDP events when running in "--undetected" mode.)
    --log-cdp  ("goog:loggingPrefs", {"performance": "ALL", "browser": "ALL"})
    --remote-debug  (Sync to Chrome Remote Debugger chrome://inspect/#devices)
    --ftrace | --final-trace  (Debug Mode after each test. Don't use with CI!)
    --dashboard  (Enable the SeleniumBase Dashboard. Saved at: dashboard.html)
    --dash-title=STRING  (Set the title shown for the generated dashboard.)
    --enable-3d-apis  (Enables WebGL and 3D APIs.)
    --swiftshader  (Chrome "--use-gl=angle" / "--use-angle=swiftshader-webgl")
    --incognito  (Enable Chrome's Incognito mode.)
    --guest  (Enable Chrome's Guest mode.)
    --dark  (Enable Chrome's Dark mode.)
    --devtools  (Open Chrome's DevTools when the browser opens.)
    --rs | --reuse-session  (Reuse browser session for all tests.)
    --rcs | --reuse-class-session  (Reuse session for tests in class.)
    --crumbs  (Delete all cookies between tests reusing a session.)
    --disable-beforeunload  (Disable the "beforeunload" event on Chrome.)
    --window-position=X,Y  (Set the browser's starting window position.)
    --window-size=WIDTH,HEIGHT  (Set the browser's starting window size.)
    --maximize  (Start tests with the browser window maximized.)
    --screenshot  (Save a screenshot at the end of each test.)
    --no-screenshot  (No screenshots saved unless tests directly ask it.)
    --visual-baseline  (Set the visual baseline for Visual/Layout tests.)
    --wire  (Use selenium-wire's webdriver for replacing selenium webdriver.)
    --external-pdf  (Set Chromium "plugins.always_open_pdf_externally":True.)
    --timeout-multiplier=MULTIPLIER  (Multiplies the default timeout values.)
    --list-fail-page  (After each failing test, list the URL of the failure.)
    Ú ÚlinuxZSeleniumBaseZSeleniumZBaseú zcommand-line options for pytestz	--browserÚstoreÚbrowserzrSpecifies the web browser to use. Default: Chrome.
                Examples: (--browser=edge OR --browser=firefox))ÚactionÚdestÚtypeÚchoicesÚdefaultÚhelpz--chromeÚ
store_trueÚ
use_chromeFz'Shortcut for --browser=chrome (Default))r   r   r   r   z--edgeÚuse_edgezShortcut for --browser=edgez	--firefoxÚuse_firefoxzShortcut for --browser=firefoxz--ieÚuse_iezShortcut for --browser=iez--safariÚ
use_safarizShortcut for --browser=safariz--operaÚ	use_operazShortcut for --browser=operaz--braveÚ	use_bravezShortcut for --browser=bravez--cometÚ	use_cometzShortcut for --browser=cometz--atlasÚ	use_atlaszShortcut for --browser=atlasz--use-chromiumÚuse_chromiumz"Shortcut for using base `Chromium`z--cftÚuse_cftz'Shortcut for using `Chrome for Testing`z--chsÚuse_chsz*Shortcut for using `Chrome-Headless-Shell`z--with-seleniumÚwith_seleniumTzt(DEPRECATED) Start tests with an open web browser.
                (This is ALWAYS True now when importing BaseCase)z--envÚenvironmentzrThis option sets a test env from a list of choices.
                Access using "self.env" or "self.environment".z	--accountÚaccountNzfThis option sets a test account string.
                In tests, use "self.account" to get the value.)r   r   r   z--dataÚdataz2Extra data to pass to tests from the command line.z--var1Úvar1z--var2Úvar2z--var3Úvar3z--variablesÚ	variablesa/  A var dict to pass to tests from the command line.
                Example usage:
                ----------------------------------------------
                Option: --variables='{"special":123}'
                Access: self.variables["special"]  # (123)
                ----------------------------------------------
                Option: --variables='{"color":"red","num":42}'
                Access: self.variables["color"]  # ("red")
                Access: self.variables["num"]  # (42)
                ----------------------------------------------z
--cap_filez
--cap-fileÚcap_filezoThe file that stores browser desired capabilities
                for BrowserStack, Sauce Labs, or other grids.z--cap_stringz--cap-stringÚ
cap_stringa!  The string that stores browser desired capabilities
                for BrowserStack, Sauce Labs, or other grids.
                Enclose cap-string in single quotes.
                Enclose parameter keys in double quotes.
                Example: --cap-string='{"name":"test1","v":"42"}'z--settings_filez--settings-filez
--settingsÚsettings_filez‡The file that stores key/value pairs for
                overriding values in the
                seleniumbase/config/settings.py file.z--user_data_dirz--user-data-dirÚuser_data_dirzrThe Chrome User Data Directory to use. (Profile)
                If the directory doesn't exist, it'll be created.z--with-testing_basez--with-testing-baseÚwith_testing_baseav  (DEPRECATED) - This option is always enabled now.
                Use for saving logs & screenshots when tests fail.
                The following options are now active by default
                with --with-testing_base (which is always on now):
                --with-screen_shots ,
                --with-basic_test_info ,
                --with-page_source
            z
--log_pathz
--log-pathÚlog_pathú/zt(DEPRECATED) - This value is NOT EDITABLE anymore.
                Log files are saved to the "latest_logs/" folder.z--archive_logsz--archive-logsÚarchive_logsz/Archive old log files instead of deleting them.z--archive_downloadsz--archive-downloadsÚarchive_downloadsz/Archive old downloads instead of deleting them.z--sjwz--skip_js_waitsz--skip-js-waitsÚskip_js_waitsz²Skip all calls to wait_for_ready_state_complete()
                and wait_for_angularjs(), which are part of many
                SeleniumBase methods for improving reliability.z--wfaz--wait_for_angularjsz--wait-for-angularjsÚwait_for_angularjsz«Add waiting for AngularJS. (The default setting
                was changed to no longer wait for AngularJS to
                finish loading as an extra JavaScript call.)z--with-db_reportingz--with-db-reportingÚwith_db_reportingz.Use to record test data in the MySQL database.z--database_envz--database-envÚdatabase_envz-The database environment to run the tests in.)r   r   r   r   r   z--with-s3_loggingz--with-s3-loggingÚwith_s3_loggingz(Use to save test log files in Amazon S3.z--with-screen_shotsz--with-screen-shotsÚwith_screen_shotszú(DEPRECATED) - Screenshots are always saved now.
                This option saves screenshots during test failures.
                Screenshots are saved in the "latest_logs/" folder.
                (Automatically on when using --with-testing_base)z--with-basic_test_infoz--with-basic-test-infoÚwith_basic_test_infozù(DEPRECATED) - Info files are always saved now.
                This option saves basic test info on test failures.
                These files are saved in the "latest_logs/" folder.
                (Automatically on when using --with-testing_base)z--with-page_sourcez--with-page-sourceÚwith_page_sourcez·(DEPRECATED) - Page source is saved by default.
                This option saves page source files on test failures.
                (Automatically on when using --with-testing_base)z
--protocolÚprotocolzLDesignates the Selenium Grid protocol to use.
                Default: http.z--serverÚ
servernameÚ	localhostzÒDesignates the Selenium Grid server to use.
                Use "127.0.0.1" to connect to a localhost Grid.
                If unset or set to "localhost", Grid isn't used.
                Default: "localhost".z--portÚportZ4444zkDesignates the Selenium Grid port to use.
                Default: 4444. (If 443, protocol becomes "https")z--proxyz--proxy-serverz--proxy-stringÚproxy_stringzðDesignates the proxy server:port to use.
                Format: servername:port.  OR
                        username:password@servername:port  OR
                        A dict key from proxy_list.PROXY_LIST
                Default: None.z--proxy-bypass-listz--proxy_bypass_listÚproxy_bypass_lista  Designates the hosts, domains, and/or IP addresses
                to bypass when using a proxy server with "--proxy".
                Format: A ";"-separated string.
                Example usage:
                    pytest
                        --proxy="username:password@servername:port"
                        --proxy-bypass-list="*.foo.com;github.com"
                    pytest
                        --proxy="servername:port"
                        --proxy-bypass-list="127.0.0.1:8080"
                Default: None.z--proxy-pac-urlz	--pac-urlÚproxy_pac_urlz£Designates the proxy PAC URL to use.
                Format: A URL string  OR
                        A username:password@URL string
                Default: None.z--proxy-driverz--proxy_driverÚproxy_driverzdIf a driver download is needed for tests,
                uses proxy settings set via --proxy=PROXY.z--multi-proxyz--multi_proxyÚmulti_proxyz¥If you need to run multi-threaded tests with
                multiple proxies that require authentication,
                set this to allow multiple configurations.z--agentz--user-agentz--user_agentÚ
user_agentzrDesignates the User-Agent for the browser to use.
                Format: A string.
                Default: None.z--mobilez--mobile-emulatorz--mobile_emulatorÚmobile_emulatorz`If this option is enabled, the mobile emulator
                will be used while running tests.z	--metricsz--device-metricsz--device_metricsÚdevice_metricsa<  Designates the three device metrics of the mobile
                emulator: CSS Width, CSS Height, and Pixel-Ratio.
                Format: A comma-separated string with the 3 values.
                Examples: "375,734,5" or "412,732,3" or "390,715,3"
                Default: None. (Will use default values if None)z--chromium_argz--chromium-argÚchromium_arga  Add a Chromium argument for Chrome/Edge browsers.
                Format: A comma-separated list of Chromium args.
                If an arg doesn't start with "--", that will be
                added to the beginning of the arg automatically.
                Default: None.z--firefox_argz--firefox-argÚfirefox_arga  Add a Firefox argument for Firefox browser runs.
                Format: A comma-separated list of Firefox args.
                If an arg doesn't start with "--", that will be
                added to the beginning of the arg automatically.
                Default: None.z--firefox_prefz--firefox-prefÚfirefox_prefa9  Set a Firefox preference:value combination.
                Format: A comma-separated list of pref:value items.
                Example usage:
                    --firefox-pref="browser.formfill.enable:True"
                    --firefox-pref="pdfjs.disabled:False"
                    --firefox-pref="abc.def.xyz:42,hello.world:text"
                Boolean and integer values to the right of the ":"
                will be automatically converted into proper format.
                If there's no ":" in the string, then True is used.
                Default: None.z--extension_zipz--extension-zipz--crxÚextension_zipzÏDesignates the Chrome Extension ZIP file to load.
                Format: A comma-separated list of .zip or .crx files
                containing the Chrome extensions to load.
                Default: None.z--extension_dirz--extension-dirÚextension_dirzØDesignates the Chrome Extension folder to load.
                Format: A directory containing the Chrome extension.
                (Can also be a comma-separated list of directories.)
                Default: None.z--disable_featuresz--disable-featuresÚdisable_featuresz˜Disable Chromium features from Chrome/Edge browsers.
                Format: A comma-separated list of Chromium features.
                Default: None.ú--binary_locationú--binary-locationú--blÚbinary_locationzzSets the path of the Chromium browser binary to use.
                Uses the default location if not os.path.exists(PATH)z--driver_versionz--driver-versionÚdriver_versionzúSetting this overrides the default driver version,
                which is set to match the detected browser version.
                Major version only. Example: "--driver-version=114"
                (Only chromedriver and uc_driver are affected.)z--plsz--page_load_strategyz--page-load-strategyÚpage_load_strategyzgThis option sets Chrome's pageLoadStrategy.
                List of choices: "normal", "eager", "none".z
--headlessÚheadlesszÙUsing this option activates headless mode,
                which is required on headless machines
                UNLESS using a virtual display with Xvfb.
                Default: False on Mac/Windows. True on Linux.z--headless1Ú	headless1zŸThis option activates the old headless mode,
                which is faster, but has limitations.
                (May be phased out by Chrome in the future.)z--headless2Ú	headless2z©This option activates the new headless mode,
                which supports Chromium extensions, and more,
                but is slower than the standard headless mode.z--headedz--guiÚheadedzëUsing this makes Webdriver run web browsers with
                a GUI when running tests on Linux machines.
                (The default setting on Linux is headless.)
                (The default setting on Mac or Windows is headed.)z--xvfbÚxvfba  Using this makes tests run headlessly using Xvfb
                instead of the browser's built-in headless mode.
                When using "--xvfb", the "--headless" option
                will no longer be enabled by default on Linux.
                Default: False. (Linux-ONLY!)z--xvfb-metricsz--xvfb_metricsÚxvfb_metricszþCustomize the Xvfb metrics (Width,Height) on Linux.
                Format: A comma-separated string with the 2 values.
                Examples: "1920,1080" or "1366,768" or "1024,768".
                Default: None. (None: "1366,768". Min: "1024,768".)z--locale_codez--locale-codez--localeÚlocale_codea@  Designates the Locale Code for the web browser.
                A Locale is a specific version of a spoken Language.
                The Locale alters visible text on supported websites.
                See: https://seleniumbase.io/help_docs/locale_codes/
                Default: None. (The web browser's default mode.)z
--intervalÚintervala,  This globally overrides the default interval,
                (in seconds), of features that include autoplay
                functionality, such as tours and presentations.
                Overrides from methods take priority over this.
                (Headless Mode skips tours and presentations.)z--start_pagez--start-pagez--urlÚ
start_pagezuDesignates the starting URL for the web browser
                when each test begins.
                Default: None.z--is_pytestz--is-pytestÚ	is_pytestzlThis is used by the BaseCase class to tell apart
                pytest runs from nosetest runs. (Automatic)z--all-scriptsz--all_scriptsÚall_scriptsz˜Use this to run `SB()`, `DriverContext()` and
                `Driver()` scripts that are discovered during
                the pytest collection phase.z--time_limitz--time-limitz--timelimitÚ
time_limitzmUse this to set a time limit per test, in seconds.
                If a test runs beyond the limit, it fails.z--slow_modez--slow-modez--slowmoz--slowÚ	slow_modez%Using this slows down the automation.z--demo_modez--demo-modez--demoÚ	demo_modezqUsing this slows down the automation and lets you
                visually see what the tests are actually doing.z--demo_sleepz--demo-sleepÚ
demo_sleepzcSetting this overrides the Demo Mode sleep
                time that happens after browser actions.z--highlightsÚ
highlightszhSetting this overrides the default number of
                highlight animation loops to have per call.z--message_durationz--message-durationÚmessage_durationz¥Setting this overrides the default time that
                messenger notifications remain visible when
                reaching assert statements during Demo Mode.z
--check_jsz
--check-jsÚjs_checking_onzPThe option to check for JavaScript errors after
                every page load.z	--adblockz
--ad_blockz
--ad-blockz--block_adsz--block-adsÚad_block_onzmUsing this makes WebDriver block display ads
                that are defined in ad_block_list.AD_BLOCK_LIST.z--host_resolver_rulesz--host-resolver-rulesÚhost_resolver_rulesa“  Use this option to set "host-resolver-rules".
                This lets you re-map traffic from any domain.
                Eg. "MAP www.google-analytics.com 0.0.0.0".
                Eg. "MAP * ~NOTFOUND , EXCLUDE myproxy".
                Eg. "MAP * 0.0.0.0 , EXCLUDE 127.0.0.1".
                Eg. "MAP *.google.com myproxy".
                Find more examples on these pages:
                (https://www.electronjs.org/docs/
                 latest/api/command-line-switches)
                (https://www.chromium.org/developers/
                 design-documents/network-stack/socks-proxy/)
                Use comma-separation for multiple host rules.z--block_imagesz--block-imagesÚblock_imagesz_Using this makes WebDriver block images from
                loading on web pages during tests.z--do_not_trackz--do-not-trackÚdo_not_trackzåIndicate to websites that you don't want to be
                tracked. The browser will send an extra HTTP
                header each time it requests a web page.
                https://support.google.com/chrome/answer/2790761z--verify_delayz--verify-delayÚverify_delayzfSetting this overrides the default wait time
                before each MasterQA verification pop-up.z	--esc-endz	--esc_endz--eeÚesc_endz_End the current test early via the ESC key.
                The test will be marked as skipped.z
--recorderz--recordz--recz	--codegenÚrecorder_modez•Using this enables the SeleniumBase Recorder,
                which records browser actions for converting
                into SeleniumBase scripts.z--rec-behavez--rec-gherkinÚ
rec_behavezþNot only enables the SeleniumBase Recorder,
                but also saves recorded actions into the
                behave-gerkin format, which includes a
                feature file, an imported steps file,
                and the environment.py file.z--rec-sleepz--record-sleepÚrecord_sleepzJIf Recorder Mode is enabled,
                records sleep(seconds) calls.z--rec-printÚ	rec_printzKIf Recorder Mode is enabled,
                prints output after tests end.z--disable_jsz--disable-jsÚ
disable_jsziThe option to disable JavaScript on web pages.
                Warning: Most web pages will stop working!z--disable_cookiesz--disable-cookiesÚdisable_cookieszdThe option to disable Cookies on web pages.
                Warning: Several pages may stop working!z--disable_cspz--disable-cspz--no_cspz--no-cspz--dcspÚdisable_cspam  Using this disables the Content Security Policy of
                websites, which may interfere with some features of
                SeleniumBase, such as loading custom JavaScript
                libraries for various testing actions.
                Setting this to True (--disable-csp) overrides the
                value set in seleniumbase/config/settings.pyz--disable_wsz--disable-wsz--dwsz--disable-web-securityÚ
disable_wszrUsing this disables the "Web Security" feature of
                Chrome and Chromium-based browsers such as Edge.z--enable_wsz--enable-wsz--enable-web-securityÚ	enable_wszqUsing this enables the "Web Security" feature of
                Chrome and Chromium-based browsers such as Edge.z--enable_syncz--enable-syncÚenable_syncz-Using this enables the "Chrome Sync" feature.z--use_auto_extz--use-auto-extz
--auto-extÚuse_auto_extz•(DEPRECATED) - Enable the automation extension.
                It's not required, but some commands & advanced
                features may need it.z--undetectedz--undetectablez--ucÚundetectablez¯Using this option makes chromedriver undetectable
                to websites that use anti-bot services to block
                automation tools from navigating them freely.z--uc_cdp_eventsz--uc-cdp-eventsz--uc-cdpÚuc_cdp_eventsa�  Captures CDP events during Undetectable Mode runs.
                Then you can add a listener to perform actions on
                received data, such as printing it to the console:
                    from pprint import pformat
                    self.driver.add_cdp_listener(
                        "*", lambda data: print(pformat(data))
                    )
                    self.open(URL)z--uc_subprocessz--uc-subprocessz--uc-subÚuc_subprocessz¬(DEPRECATED) - (UC Mode always uses this now.)
                Use undetectable-chromedriver as a subprocess,
                which can help avoid issues that might result.z--no_sandboxz--no-sandboxÚ
no_sandboxz¯(DEPRECATED) - "--no-sandbox" is always used now.
                Using this enables the "No Sandbox" feature.
                (This setting is now always enabled by default.)z--disable_gpuz--disable-gpuÚdisable_gpuz°(DEPRECATED) - GPU is disabled if no swiftshader.
                Using this enables the "Disable GPU" feature.
                (GPU is disabled by default if swiftshader off.)z	--log_cdpz	--log-cdpz--log_cdp_eventsz--log-cdp-eventsÚlog_cdp_eventszeCapture CDP events. Then you can print them.
                Eg. print(driver.get_log("performance"))z--remote_debugz--remote-debugz--remote-debuggerz--remote_debuggerÚremote_debuga;  This syncs the browser to Chromium's remote debugger.
                To access the remote debugging interface, go to:
                chrome://inspect/#devices while tests are running.
                The previous URL was at: http://localhost:9222/
                Info: chromedevtools.github.io/devtools-protocol/z--final-debugz--final-tracez--fdebugz--ftraceÚfinal_debugzñEnter Debug Mode at the end of each test.
                To enter Debug Mode only on failures, use "--pdb".
                If using both "--final-debug" and "--pdb" together,
                then Debug Mode will activate twice on failures.z--dashboardÚ	dashboardzìUsing this enables the SeleniumBase Dashboard.
                To access the SeleniumBase Dashboard interface,
                open the dashboard.html file located in the same
                folder that the pytest command was run from.z--dash_titlez--dash-titleÚ
dash_titlez0Set the title shown for the generated dashboard.z--enable_3d_apisz--enable-3d-apisÚenable_3d_apisz%Using this enables WebGL and 3D APIs.z--swiftshaderÚswiftshaderzcUsing this enables the "--use-gl=swiftshader"
                feature when running tests on Chrome.z--incognitoz--incognito_modez--incognito-modeÚ	incognitoz+Using this enables Chrome's Incognito mode.z--guestz--guest_modez--guest-modeÚ
guest_modez'Using this enables Chrome's Guest mode.z--darkz--dark_modez--dark-modeÚ	dark_modez&Using this enables Chrome's Dark mode.z
--devtoolsz--open_devtoolsz--open-devtoolsÚdevtoolsz#Using this opens Chrome's DevTools.z--rsz--reuse_sessionz--reuse-sessionÚreuse_sessionzVThe option to reuse the selenium browser window
                session for all tests.z--rcsz--reuse_class_sessionz--reuse-class-sessionÚreuse_class_sessionzlThe option to reuse the selenium browser window
                session for all tests within the same class.z--crumbsÚcrumbsa2  The option to delete all cookies between tests
                that reuse the same browser session. This option
                is only useful if using "--reuse-session"/"--rs"
                or "--reuse-class-session"/"--rcs" because tests
                use a new clean browser if not reusing sessions.z--disable-beforeunloadz--disable_beforeunloadÚ_disable_beforeunloadz¡The option to disable the "beforeunload" event
                on Chromium browsers (Chrome or Edge).
                This is already the default Firefox option.z--window-positionz--window_positionÚwindow_positionzØThe option to set the starting window x,y position
                Format: A comma-separated string with the 2 values.
                Example: "55,66"
                Default: None. (Will use default values if None)z--window-sizez--window_sizeÚwindow_sizezÝThe option to set the default window "width,height".
                Format: A comma-separated string with the 2 values.
                Example: "1200,800"
                Default: None. (Will use default values if None)z--maximize_windowz--maximize-windowz
--maximizez--fullscreenÚmaximize_optionzrThe option to start with a maximized browser window.
                (Overrides the "window-size" option if used.)z--screenshotz--save_screenshotz--save-screenshotz--ssÚsave_screenshotz£Save a screenshot at the end of every test.
                By default, this is only done for failures.
                Will be saved in the "latest_logs/" folder.z--no-screenshotz--no_screenshotz--nsÚno_screenshotz·No screenshots saved unless tests directly ask it.
                This changes default behavior where screenshots are
                saved for test failures and pytest-html reports.z--visual_baselinez--visual-baselineÚvisual_baselinezçSetting this resets the visual baseline for
                Automated Visual Testing with SeleniumBase.
                When a test calls self.check_window(), it will
                rebuild its files in the visual_baseline folder.z--wireÚuse_wirez5Use selenium-wire's webdriver for selenium webdriver.z--external_pdfz--external-pdfÚexternal_pdfzïThis option sets the following on Chromium:
                "plugins.always_open_pdf_externally": True,
                which causes opened PDF URLs to download immediately,
                instead of being displayed in the browser window.z--timeout_multiplierz--timeout-multiplierÚtimeout_multiplierzªSetting this overrides the default timeout
                by the multiplier when waiting for page elements.
                Unused when tests override the default value.z--lfpz--list-fail-pagez--list-fail-pagesÚ	fail_pagezí(For debugging) After each failing test, list the URL
                where the failure occurred.
                Useful when you don't have access to the latest_logs/
                folder, such as when running tests in GitHub Actions.)rO   rN   rP   z
--timeout=z�
  Don't use --timeout=s from pytest-timeout! 
  It's not thread-safe for WebDriver processes! 
  Use --time-limit=s from SeleniumBase instead!
z--forkedzr
  Dashboard Mode does NOT support forked subprocesses!
  (*** DO NOT combine "--forked" with "--dashboard"! ***)
zy
  Reuse-Session Mode does NOT support forked subprocesses!
  (DO NOT combine "--forked" with "--rs"/"--reuse-session"!)
ú-nú -n=ú-czt
  Recorder Mode does NOT support multi-process mode (-n)!
  (DO NOT combine "--recorder" with "-n NUM_PROCESSES"!)
r   z--browser=chromez--browser chromeé   Úchromez--browser=edgez--browser edgeÚedgez--browser=firefoxz--browser firefoxÚfirefoxz--browser=safariz--browser safariÚsafariz--browser=iez--browser ieÚiez--browser=remotez--browser remoteÚremotez--browser=operaz--browser operaÚoperaz--browser=bravez--browser braveÚbravez--browser=cometz--browser cometÚcometz--browser=atlasz--browser atlasÚatlasz'
  TOO MANY browser types were entered!z
  There were %s found:
  >  %sz, z'
  ONLY ONE default browser is allowed!z(
  Select a single browser & try again!
©r™   rš   rŸ   r    r¡   r¢   ÚchromiumzT
  Recorder Mode ONLY supports Chromium browsers!
  (Your browser choice was: "%s")
)r™   rŸ   r    r¡   r¢   r¤   z‡
  Undetected-Chromedriver Mode ONLY supports Chrome!
  ("--uc" / "--undetected" / "--undetectable")
  (Your browser choice was: "%s")
z¸
  SeleniumBase doesn't support mixing --uc with --wire mode!
  If you need both, override get_new_driver() from BaseCase:
  https://seleniumbase.io/help_docs/syntax_formats/#sb_sf_09
)FÚsysÚplatformÚcoloramaÚForeÚBLUEÚBackÚLIGHTCYAN_EXZLIGHTGREEN_EXZMAGENTAZLIGHTYELLOW_EXÚStyleÚ	RESET_ALLÚreplaceZgetgroupZ	addoptionÚstrÚlowerr   ZValidBrowsersZvalid_browsersZBrowserZGOOGLE_CHROMEÚEnvironmentZQAÚRCZSTAGINGZDEVELOPZ
PRODUCTIONZPERFORMANCEZREPLICAZFEDRAMPZOFFLINEZONLINEZMASTERZREMOTEZLEGACYZLOCALZALPHAZBETAZDEMOZGDPRZMAINÚTESTZGOVZNEWZOLDZUATÚLogsÚLATESTÚProtocolÚHTTPZHTTPSZPageLoadStrategyZNORMALZEAGERÚNONEÚjoinÚsys_argvÚ	sb_configÚ_browser_shortcutZ_cdp_browserÚ_cdp_bin_locÚ_vd_listÚ	ExceptionÚappendr   Úget_binary_locationÚosÚpathÚexists)ÚparserÚc1Úc2Úc3ÚcrZs_strÚarg_joinZbin_loc_in_optionsÚargZusing_recorderZbrowser_changesZbrowser_setZbrowser_textZbrowser_listÚbin_locÚmessagerw   © rÎ   úHE:\soccer\ml_env\Lib\site-packages\seleniumbase/plugins/pytest_plugin.pyÚpytest_addoption   s
   o
ù
ûûûûûûûûûûûûûèà#üüüüüüûûùûú
ûúúùùúèà"úúúú
þ÷û
ûùúúú	ú
ùù
ùúúúùúú
ù
úýóû
û	û	úûúùûùú	ú
ù
ø
ù
ú	ûú
ú	÷úú	úú	ù
øúú	ûú	ú	÷øù
úùùùùú
ú
øøøû
ûúûù	ù	ù	ù	ù
ù
ûú
úúøøùúûúú
ù
ÿÿÿÿÿÿþý$ÿÿþý




























þ

ÿþýÿÿÿþýüûúùø	÷ÿþûþÿÿrÐ   c                 C   sÐ  dt _dt _dt _dt _dt _dt _dt _dt _dt _	| t _
|  d¡t _t jrXt jt _nÀtdgk�r|  d¡r�t d¡}|rŽtj |¡rŽdt _nˆ|  d¡r¼t d	¡}|rºtj |¡rºd	t _n\|  d
¡rèt d¡}|rætj |¡rædt _n0|  d¡�rt d¡}|�rtj |¡�rdt _|  d¡t _|  d¡t _|  d¡t _|  d¡t _|  d¡t _|  d¡t _|  d¡t _|  d¡t _|  d¡t _|  d¡t _|  d¡t _|  d¡t _|  d¡t _ t j �rÂdt _|  d¡t _!t j!�rðt jdk�rðdt _!dt _nt jdv�rdt _!|  d¡t _"|  d¡t _#|  d ¡t _$|  d!¡t _%|  d"¡t _&|  d#¡t _'|  d$¡t _(|  d%¡t _)|  d&¡t _*|  d'¡t _+|  d(¡t _,|  d)¡t _-|  d*¡t _.t/t d+d,ƒ�r¶t j0t _.nþt j.�s´|  d¡�sÖt jdk�rüt d¡}|�r´tj |¡�r´|t _.n¸|  d¡�st jd	k�r:t d	¡}|�r´tj |¡�r´|t _.nz|  d
¡�sRt jdk�rxt d¡}|�r´tj |¡�r´|t _.n<|  d¡�s�t jdk�r´t d¡}|�r´tj |¡�r´|t _.|  d-¡�rÐt j.�sÐd.t _.n6|  d/¡�rìt j.�sìd0t _.n|  d1¡�rt j.�sd2t _.t j.�r<t j. 1¡ d2k�r<t jd3k�r<dt _dt _ dt _!t jt2j3j4v �rbt j.�sbd3t _t jt _|  d4¡t _5|  d5¡t _6|  d6¡t _7|  d7¡t _8|  d8¡t _9|  d9¡t _:|  d:¡t _;|  d;¡t _<|  d<¡t _=|  d=¡t _>|  d>¡t _?t j>d?k�rt@t j?ƒd@k�rdAt _=|  dB¡t _A|  dC¡t _B|  dD¡t _C|  dE¡t _D|  dF¡t _E|  dG¡t _F|  dH¡t _G|  dI¡t _H|  dJ¡t _I|  dK¡t _Jt2jKjLdL t _M|  dM¡t _N|  dN¡�r¬dtO_P|  dO¡�r¾dtO_Q|  dP¡�rÐdtO_R|  dQ¡t _S|  dR¡t _T|  dR¡t _U|  dS¡t _V|  dT¡t _W|  dU¡t _X|  dV¡t _Y|  dW¡t _Z|  dX¡t _[|  dY¡t _\|  dZ¡t _]|  d[¡t _^|  d\¡t __|  d]¡t _`|  d^¡t _a|  d_¡t _b|  d_¡t _c|  d`¡t _d|  da¡t _e|  db¡t _ft je�rÞt jb�sÞdt _bdt _cn:t jd�rüt jb�südt _bdt _cnt jf�rt jb�sdt _bdt _c|  dc¡t _g|  dd¡t _h|  de¡t _i|  df¡t _j|  dg¡t _kt jj�sbdt _k|  dh¡t _l|  di¡t _m|  dj¡t _n|  dk¡t _ot jo�r¨t jn�s¨dt _n|  dl¡t _pt jp�rÊt jn�sÊdt _n|  dm¡t _q|  dn¡t _r|  do¡t _s|  dp¡t _t|  dq¡t _u|  dr¡t _v|  ds¡t _w|  dt¡t _x|  du¡t _y|  dv¡t _z|  dw¡t _{|  dx¡t _||  dy¡t _}|  dz¡t _~|  d{¡t _t j�rŒdt _~d,t _€|  d|¡t _�|  d}¡t _‚|  d~¡t _ƒ|  d¡t _„|  d€¡t _…|  d�¡t _†|  d‚¡t _‡|  dƒ¡t _ˆ|  d„¡t _‰|  d…¡t _Š|  d†¡t _‹|  d‡¡t _Œdt _�dt _Žd,t _�tOj�t _‘tOj’t _“|  dˆ¡t _”d,t _•i t _–i t _—i t _˜i t _™i t _šd,t _›d,t _œd,t _�dt _ždt _Ÿdt _ dt _¡dt _¢g t _£dt _¤dt _¥d,t _¦d,t _§d,t _¨d,t _©d‰ ªt¡}dŠtv �
s0d‹|v �
s0dŒ|v �
s0dtv �
s0d�|  «dŽ¡v �
s0d�|  «dŽ¡v �
s0dŠ|  «dŽ¡v �
r6dt _ d�tv �
sjd‘|v �
sjd’|  «dŽ¡v �
sjd“|  «dŽ¡v �
rœdt _¤|  dˆ¡t _¨t jv�
r–t j¨d”k�
r–dt _¥d•t _©t jb�
rÀt j �
rÀt¬d–ƒ dt _bdt _ct j#�
rÚd—t­j®v�
rÚdt _#d—t­j®v �r$t j"�s$t j�s$t j!�s$t j#�s$t jn�st¬d˜ƒ dt _ndt _#t jb�rFt j�rFdt _dt _ dt _!t j�s\t j!�s\dt _"|  d™¡�rpd3t _nP|  dš¡�r„d›t _n<|  dœ¡�r˜dt _n(|  d�¡�r¬džt _n|  dŸ¡�rÀd t _n t jd k�ràt j�ràdt _dt _ t jw�rút jw ¯d¡d‰¡t2j°_±t j†�rt j‡�rdt _†d¢tv �r"t j �rlt²| d£ƒ�rrd¢| j³j´v �rrd¤| j³j´v �sld¥| j³j´v �sld¦d‰ ª| j³j´¡v �rrdt _Œt j �rÌd§tv�rÌd¨tv�rÌdd©lµm¶} ddªlµm·} t¸ ¹t2jKjLdL t jN¡ | º¡  | »¡  d,S )«z6This runs after command-line options have been parsed.r   TFr   r—   r   rŸ   r   r    r   r¡   r   r¢   r%   r&   r'   r(   r)   r*   r$   r#   rE   rF   rG   rT   rU   rV   r›   r£   rW   rX   rY   rZ   r[   r\   rH   rI   rJ   rK   rL   rM   rQ   r½   Nr    Z
_chromium_r!   Zcftr"   Zchsr™   rR   rS   r/   r6   r8   r9   r:   r;   r<   r=   r?   r>   Ú443Úhttpsr@   rA   rB   rC   rD   r+   r,   r-   r.   r7   r1   r2   r3   r4   r5   r^   r_   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   ro   rn   rq   rp   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r€   r�   r‚   rƒ   r„   r…   r†   r‡   rˆ   r‰   rŠ   r‹   rŒ   r�   rŽ   r�   r�   r‘   r’   r“   r”   Úhtmlpathr   r•   r–   z -nz-n=Zaddoptsz-n z--htmlz --html=z--html=z--html údashboard.htmlzlast_report.htmlz§
  Recorder Mode does NOT support multi-process mode (-n)!
  (DO NOT combine "--recorder" with "-n NUM_PROCESSES"!)
  (The Recorder WILL BE DISABLED during this run!)
r   z­(Linux uses --headless by default. To override, use --headed / --gui. For Xvfb mode instead, use --xvfb. Or you can hide this info by using --headless / --headless2 / --uc.)r   r   rš   r   r   r�   r   rœ   Ú_z-vÚinvocation_paramsz-n=1z-n1z-n 1ú--coú--collect-only©Údownload_helper©Úproxy_helper)¼r»   Ú
item_countZitem_count_passedZitem_count_failedZitem_count_skippedÚitem_count_untestedr]   Z	is_behaveZis_nosetestZis_context_managerÚpytest_configÚ	getoptionr   r¼   rº   r   rÁ   rÂ   rÃ   rÄ   r%   r&   r'   r(   r)   r*   r$   r#   rE   rF   rG   rT   rU   rV   rW   rX   rY   rZ   r[   r\   rH   rI   rJ   rK   rL   rM   rQ   Úgetattrr½   r°   r   ZChromiumSubsZchromium_subsrR   rS   r/   r6   r8   r9   r:   r;   r<   r=   r?   r¯   r@   rA   rB   rC   rD   r+   r,   r-   r.   r7   r´   rµ   r0   r2   r   ZARCHIVE_EXISTING_DOWNLOADSZSKIP_JS_WAITSZWAIT_FOR_ANGULARJSr^   Z_time_limitr_   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   Zrecorder_extrm   ro   rn   rq   rp   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r€   r�   r‚   rƒ   r„   r…   r†   r‡   rˆ   Úshared_driverr‰   rŠ   r‹   rŒ   r�   rŽ   r�   r�   r‘   r’   r“   Úlist_fpZ_is_timeout_changedÚ	_has_logsÚ
_fail_pageZSMALL_TIMEOUTZ_SMALL_TIMEOUTZLARGE_TIMEOUTZ_LARGE_TIMEOUTZpytest_html_reportÚ	_sb_classÚ_sb_nodeÚ_resultsÚ	_durationÚ_display_idÚ_d_t_log_pathÚ
_dash_htmlÚ_test_idÚ_latest_display_idZ_dashboard_initializedÚ_has_exceptionÚ_multithreadedÚ_only_unittestÚ_sbase_detectedÚ_extra_dash_entriesÚ_using_html_reportÚ_dash_is_html_reportÚ_saved_dashboard_pieÚ_dash_final_summaryÚ_html_report_nameÚ_html_report_copyr¹   ZgetiniÚprintr¥   r¦   r®   Ú	DashboardZTITLEÚhasattrrÖ   ÚargsÚseleniumbase.corerÚ   rÜ   r   Úlog_folder_setupÚreset_downloads_folderÚremove_proxy_zip_if_present)r   rÌ   rÊ   rÚ   rÜ   rÎ   rÎ   rÏ   Úpytest_configureŒ  sÄ   







ÿ
ÿþ
ÿþ
ÿþ
ÿþ
ÿþý
ÿþýüûúù	ÿþýüÿÿþýüûÿÿÿý
ü
ú
ùøÿþýÿr  c                 C   s   d S ©NrÎ   ©ÚsessionrÎ   rÎ   rÏ   Úpytest_sessionstart  s    r  c                 C   s   | j }|sd}|}||fS )NÚunidentified_TestCase)Únodeid)Zthe_itemÚtest_idÚ
display_idrÎ   rÎ   rÏ   Ú_get_test_ids_	  s
    r  c                  C   s�  ddl m}  ddlm} tj d¡}tj |d¡}tj |¡stt	t
ƒ� tj|dd� W d   ƒ n1 sj0    Y  tj |d¡}d}tj |¡rØd }t|d	d
��}| ¡ }W d   ƒ n1 sÀ0    Y  ||ƒ krØd}|rþt|ddd�}| |ƒ ¡ | ¡  tj |d¡}	d}
tj |	¡�rfd }t|	d	d
��}| ¡ }W d   ƒ n1 �sN0    Y  || k�rfd}
|
�rŒt|	ddd�}| | ¡ | ¡  d S )Nr   )Úlive_js)Úget_pytest_styleÚ.ZassetsT)Úexist_okzpytest_style.cssÚr©ÚmodeFzw+úutf-8©r  Úencodingzlive.js)Zseleniumbase.js_code.live_jsr  Zseleniumbase.core.style_sheetr  rÂ   rÃ   Úabspathr¹   rÄ   r   r¿   ÚmakedirsÚopenÚreadÚ
writelinesÚclose)r  r  Úabs_pathZassets_folderZpytest_style_cssZadd_pytest_style_cssZexisting_pytest_styleÚfÚout_fileZlive_js_fileZadd_live_js_fileZexisting_live_jsrÎ   rÎ   rÏ   Ú_create_dashboard_assets_  s>    
,&
(

r  c                 C   s`   dt v sdt v rd S t jd7  _tjr\t| ƒ\}}dtj|< dtj|< |tj|< d tj|< d S )Nr×   rØ   r˜   ZUntestedú-)	rº   r»   rÝ   r   r  rè   ré   rê   rë   ©Úitemr	  r
  rÎ   rÎ   rÏ   Úpytest_itemcollectedB  s    


r#  c                 C   s`   dt v sdt v rd S tjr\t jt| ƒ8  _| D ]*}t|ƒ\}}|tj ¡ v r0tj |¡ q0d S )Nr×   rØ   )	rº   r»   r   rÝ   Úlenr  rè   ÚkeysÚpop)Úitemsr"  r	  r
  rÎ   rÎ   rÏ   Úpytest_deselectedN  s    r(  c           
      C   sš  dt _dtv sdtv rdS t| jƒdkrlt jslddlm} ddlm} t	 
tjjd t j¡ | ¡  | ¡  t j�r–t| jƒdk�r–tƒ  t jt _tj t ¡ d	¡}d
| dd¡ }tdƒt|ƒ }ttƒ�. t ¡ j}|dkrì||krì|}W d  ƒ n1 �s0    Y  d| }d}d}	dtjv�r@t j!j"t j#j$ }t j%j&}	t j�r‚t'| j(dƒ�r–| j(j)d dk�r–tj* +d|||	|f ¡ nt,d|||	|f ƒ dS )zcThis runs after item collection is finalized.
    https://docs.pytest.org/en/stable/reference.html Fr×   rØ   Nr   rÙ   rÛ   r1   rÔ   úfile://ú\zDashboard: é   Ú*r   r   ÚworkerinputZworkeridZgw0z
Dashboard: %s%s%s
%s
zDashboard: %s%s%s
%s)-r»   Z_context_of_runnerrº   r$  r'  rð   rþ   rÚ   rÜ   r   rÿ   r   r´   rµ   r2   r   r  r   r  rÝ   rÞ   rÂ   rÃ   r¹   Úgetcwdr®   r   r¿   Úget_terminal_sizeÚcolumnsr¥   r¦   r§   r¨   r©   rª   r«   r¬   r­   rü   r   r-  ÚstderrÚwriterú   )
r  rÚ   rÜ   Z	dash_pathZdash_urlZstar_lenÚterminal_sizeÚstarsrÆ   rÉ   rÎ   rÎ   rÏ   Úpytest_collection_finishY  sH    ÿ

$
ÿþÿr5  c                 C   sH   dt v sdt v rdS tjr&dt_dt_dt_t| ƒ\}}|t_|t_dS )z(This runs before every test with pytest.r×   rØ   NF)	rº   r»   r   rò   Z_pdb_failurerå   r  rí   rî   r!  rÎ   rÎ   rÏ   Úpytest_runtest_setup…  s    r6  c              	   C   sf  dt v sdt v rdS ttƒ��† t| dƒs4ttdƒrìt| dƒrš| j}ttƒ�< t|ddƒrzdt vrztsz|jj	j
sz|j ¡  W d  ƒ qì1 sŽ0    Y  nRttddƒrìttƒ�. tr¾tjj	j
rÎtj ¡  dt_W d  ƒ n1 sâ0    Y  ttƒ�� t|ddƒ�r<t|jd	ƒ�r<ttd
dƒ�s<d|_dt_|j ¡  d|_ttddƒ�rvttjd	ƒ�rvttd
dƒ�svtj ¡  dt_W d  ƒ n1 �sŒ0    Y  W d  ƒ n1 �s¬0    Y  tj�sÔt�rÊt�sÔdt v �rbtj�rbtj�rbdt v �s@dt v �s@dt v �s@ttjdƒ�rPdtjjjv �s@dtjjjv �s@dtjjjv �rPtdtj ƒ ntj dtj ¡ dS )z£This runs after every test with pytest.
    Make sure that webdriver and headless displays have exited.
    (Has zero effect on tests using --reuse-session / --rs)r×   rØ   NÚ	_testcaseÚ_sb_pdb_driverÚdriverú--pdbÚ_xvfb_displayÚstopr‡   FÚ_virtual_displayz-sz--capture=noz--capture=tee-sysrÖ   z
=> Fail Page: %sz
=> Fail Page: %s
)rº   r   r¿   rü   r»   r7  rá   Ú
is_windowsr9  ÚserviceÚprocessÚquitr8  r;  Úheadless_activer<  r=  rï   Úpython3_11_or_newerÚpy311_patch2rã   rå   rß   rÖ   rý   rú   r¥   Ústdoutr2  )r"  ÚselfrÎ   rÎ   rÏ   Úpytest_runtest_teardown’  s�    


ÿþ*
ÿþ
$

ÿ
þ
ý

ÿ
þ
ý
Fþýýüúù
ÿþý
ûùÿøÿõrG  c                 C   s   d|  S )Nú%.2frÎ   )ÚdurationrÎ   rÎ   rÏ   Úpytest_html_duration_formatÛ  s    rJ  c                 C   s   d S r  rÎ   r  rÎ   rÎ   rÏ   Úpytest_sessionfinishß  s    rK  c                 C   sl  dt v sdt v rd S t| dƒr*t| jdƒs.d S t| j ¡ ƒdkrDd S tjsTtjsTd S tj	 
t ¡ tjj¡tj }d| j ¡ v rštj	 |¡ršt |¡ršdt_tjrötj	 |¡r¼t |¡r¼dt_tjrötj	 d¡}tjj}tj	 
||¡}tj	 |¡röd	t_tj�r@tj�r@tj�s@tj	 
t ¡ d
¡}d| dd¡ }|  dd| ¡ tj�sXtj�sXtj�rh|  dd| ¡ d S )Nr×   rØ   Ústatsr%  r   ÚfailedTr  FrÔ   r)  r*  r1   r   zDashboard = %szLatest Logs dir: %s)rº   rü   rL  r$  r%  r»   rð   rò   rÂ   rÃ   r¹   r.  r   r´   rµ   ÚseprÄ   Úlistdirrï   r   r  rû   ÚLOCKFILErñ   r®   Z	write_seprŽ   rä   )ÚterminalreporterZlatest_logs_dirr  Ú	dash_lockÚdash_lock_pathZdashboard_fileZdashboard_urlrÎ   rÎ   rÏ   Úpytest_terminal_summaryã  sZ    ÿ
þÿ
þýÿÿÿþýÿrT  c           ,   
   C   s†  ddl m} | j d¡}d }t|dƒr.|j}n|jj}t ¡ | }tt	dd ƒsV| 
¡  tt	dd ƒ�rtt	jr´z&tr„t	jdks„t	jjjrŽt	j ¡  W n" ty¢   Y n ty²   Y n0 d t	_ttƒ�  tt	dd ƒròtt	jd	ƒròt	j ¡  d t	_d
t	_tt	dd ƒ�rTtt	jtƒ�rTt	jD ]>}|�rttƒ� | ¡  W d   ƒ n1 �sF0    Y  �qW d   ƒ n1 �sj0    Y  tt	dƒ�rät	jdk�rät tjjd t	j ¡ t!j" #d¡�rättƒ� t$ %d¡ W d   ƒ n1 �sÚ0    Y  t &¡  tt	dd ƒ�s†d }d }t!j" 'd¡}t	j(�r&t!j" )|t	j(¡}t	j*�r>t!j" )|t	j*¡}	t	j+�r‚|�r‚t!j" #|¡�r‚t,|ddd��}
|
 -¡ }W d   ƒ n1 �sˆ0    Y  d}d}d}d}| .|d||f ¡}| .|d¡}| .|d¡}| .dd¡}| .dd¡}| .dd¡}| .d d!¡}d"}d#}| .|d$||f ¡}| .d%d&¡}| .d'd(¡}| .d)d*¡}d+}| /|¡}| /d,|¡}| /d-|¡}d.| }d/| }|d |… | ||d …  }t,|d0dd��}
|
 0|¡ W d   ƒ n1 �sÀ0    Y  ttƒ� t$ 1|¡ W d   ƒ n1 �sô0    Y  t,|	d0dd��}
|
 0|¡ W d   ƒ n1 �s.0    Y  ttƒ� t$ 1|	¡ W d   ƒ n1 �sb0    Y  d1}t!j" #|¡�r‚d }t,|ddd��}
|
 -¡ }W d   ƒ n1 �s°0    Y  |�r| .d2d3¡}| .d4d5¡}| .d6d7¡}| .d8d9¡}| .d:d;¡}| .d<d¡}| .d=d¡}t,|d0dd��}
|
 0|¡ W d   ƒ n1 �sD0    Y  ttƒ� t$ 1|¡ W d   ƒ n1 �sx0    Y  d S d}t	j2�r¢|d>tj3j4 7 }|d?7 }tj3j5}d}d@}dA}dB}dC}tj3 6¡ } tj3 7¡ }!tj3 8¡ }"dD|  }#dD|! }$�zdt!j" 'd¡}t!j" )|dE¡}%t!j" #|%¡�rXd }&t,|%ddd��}
|
 -¡ }&W d   ƒ n1 �sR0    Y  t	j9�rvdFt:v �rvtdGƒ‚t	j9�rðtj3j;}'t!j" )||'¡}(t!j" #|(¡�rðdd l<})t,|(ddH��}
|
 -¡  =¡ }*W d   ƒ n1 �sÚ0    Y  |) >|*¡t	_?|& .||¡}&|& .||¡}&|& .||¡}&|& .|#|$¡}&|&|7 }&t	j2�rÚt	j?�rÚ|& .dIt	j?¡}&|& .dJdK|" ¡}&|& .dLdM¡}&|& .dNdO¡}&t	j@�r€|&t	j@7 }&t AdP¡ t,|%d0dd��}
|
 0|&¡ W d   ƒ n1 �sº0    Y  t AdP¡ |& .dJdQ¡}&t,|%d0dd��}
|
 0|&¡ W d   ƒ n1 �s
0    Y  ttƒ� t$ 1|%¡ W d   ƒ n1 �s>0    Y  d1}t!j" #|¡�	r^d }t,|ddd��}
|
 -¡ }W d   ƒ n1 �sŒ0    Y  |�rð| .d2d3¡}| .d4d5¡}| .d6d7¡}| .d8d9¡}| .d:d;¡}| .d<d¡}| .d=d¡}t,|d0dd��}
|
 0|¡ W d   ƒ n1 �	s 0    Y  ttƒ� t$ 1|¡ W d   ƒ n1 �	sT0    Y  d }t	j(�	rzt!j" )|t	j(¡}t	j*�	r’t!j" )|t	j*¡}	t	j+�rX|�rXt!j" #|¡�rXt	j2�sXd }t,|ddd��}
|
 -¡ }W d   ƒ n1 �	sè0    Y  t	j?�
r~t	j(}+d|+v �
r&|+ BdR¡�
r&|+ Cd¡dS }+n$dT|+v �
rJ|+ BdR¡�
rJ|+ CdT¡dS }+| .dU|+ t	j?¡}| .dJdK|" ¡}t	j@�
r~|t	j@7 }d}d}d}d}| .|d||f ¡}| .|d¡}| .|d¡}| .dd¡}| .dd¡}| .dd¡}| .d d!¡}d"}d#}| .|d$||f ¡}| .d%d&¡}| .d'd(¡}| .d)d*¡}d+}| /|¡}| /d,|¡}| /d-|¡}d.| }d/| }|d |… | ||d …  }t,|d0dd��}
|
 0|¡ W d   ƒ n1 �s¬0    Y  ttƒ� t$ 1|¡ W d   ƒ n1 �sà0    Y  t,|	d0dd��}
|
 0|¡ W d   ƒ n1 �s0    Y  ttƒ� t$ 1|	¡ W d   ƒ n1 �sN0    Y  W n& tD�yn   Y n t�y€   Y n0 d S )VNr   rÛ   rQ  Ú_sessionstarttimerD   r‡   r�   r=  r<  Fr¾   r0   r1   z	./assets/r   r  r  r  r  zif (assets.length === 1) {z-container.classList.remove('media-container')z/<div class="media-container__nav--left"><</div>z0<div class="media-container__nav--right">></div>z%s %sr   z<ul>$ú$z}<ul>Ú}z<li>${val}</li>z${val},&nbsp;&nbsp;z<div>${value}</div>z<span>${value}</spanz3<a href="https://pypi.python.org/pypi/pytest-html">zG<a href="https://github.com/seleniumbase/SeleniumBase">SeleniumBase</a>z	%s and %szfindAll('.collapsiblez//findAll('.collapsiblezmediaName.innerTextz//mediaName.innerTextzcounter.innerTextz//counter.innerTextz<p class="run-count">z took z.</p>rH  z ran in %s secondsÚwz./assets/style.cssztop: -50px;z	top: 2px;z+ 50px)z+ 40px)z
ht: 240px;z
ht: 228px;z- 80px);z - 80px);
  margin-bottom: -42px;z.collapsiblez.oldcz (hide details)z (show details)z2
<script type="text/javascript" src="%s"></script>z
<!--Test Run Complete-->z2Awaiting results... (Refresh the page for updates)zATest Run ENDED: Some results UNREPORTED due to skipped tearDown()z$<td class="col-result">Untested</td>z&<td class="col-result">Unreported</td>z	href="%s"rÔ   r—   zBreak out of "try" block.r  z<h1>dashboard.html</h1>z</head>z+</head><link rel="shortcut icon" href="%s">z<html>z<html lang="en">z<head>z{<head><meta http-equiv="Content-Type" content="text/html, charset=utf-8;"><meta name="viewport" content="shrink-to-fit=no">gš™™™™™¹?z%</head><!-- Dashboard Report Done -->z.htmléÿÿÿÿr*  z<h1 id="title">%s</h1>)Erþ   rÜ   ÚpluginmanagerÚ
get_pluginrü   rU  Ú_session_startÚtimerá   r»   r  râ   r>  r   r?  r@  rA  ÚAttributeErrorr¿   r   r=  r<  rB  Ú
isinstancer¾   ÚlistrÝ   r   Zarchive_logs_if_setr   r´   rµ   r2   rÂ   rÃ   rÄ   r   Zmake_dir_files_writableZclear_empty_logsr  rø   r¹   rù   rô   r  r  r®   Úfindr2  Zmake_writablerõ   rû   ÚLIVE_JSZMETA_REFRESH_HTMLZget_dash_pie_1Zget_dash_pie_2Zget_dash_pie_3rð   rº   ZDASH_PIEÚjsonÚstripÚloadsrö   r÷   ÚsleepÚendswithÚsplitÚKeyboardInterrupt),r   rÜ   ÚreporterÚ
start_timerI  ÚdisplayZhtml_report_pathZ
the_html_rr  Zhtml_report_path_copyr  Zassets_chunkZremove_mediaZ	rm_n_leftZ
rm_n_rightZph_linkZsb_linkZ	run_countZ	run_c_locZrc_locZ
end_rc_locZrun_timeZnew_timeZassets_styleZ
html_styleZstampZfind_itZ	swap_withZ	find_it_2Zswap_with_2Z	find_it_3Zswap_with_3ZDASH_PIE_PNG_1ZDASH_PIE_PNG_2ZDASH_PIE_PNG_3Z	find_it_4Zswap_with_4Údashboard_pathZ
the_html_dZdash_pie_locZpie_pathrc  Zdash_pieZh_r_namerÎ   rÎ   rÏ   Ú_perform_pytest_unconfigure_	  s‚   
ÿþý

ÿ
þ


Lÿ
*ÿÿÿþ
ý(
þÿÿÿÿÿÿÿ
ÿ*
**
*(ÿ*
*ÿÿÿ


(,ÿþÿþþ

*
ÿ*
*(ÿ*
*ÿÿÿþ
ýü(þÿþ

þÿÿÿÿÿÿÿ
ÿ*
*ÿ*
.rn  c           	   	   C   sž  dt v sdt v rdS | j d¡}t|dƒsNt|dƒrJt|dƒrNt|jdƒsNdS ttddƒ�rŽd	dl}| t	j
j¡}ttd
dƒ�r\tj d¡}t	j
j}tj ||¡}tj |¡�rPdt_tj |d¡}|�t tj�r$|  d¡dk�r$dt_t|ddd��}| tj¡ W d  ƒ n1 �s0    Y  t| ƒ W d  ƒ dS 1 �sD0    Y  nt| ƒ dS |� t| ƒ W d  ƒ dS 1 �s‚0    Y  nt| ƒ dS dS )z5This runs after all tests have completed with pytest.r×   rØ   NrQ  rU  r\  r]  rð   r   r   r  FrÔ   rÓ   TrX  r  r  )rº   rZ  r[  rü   r\  rá   r»   Ú	fastenersZInterProcessLockr   rû   rP  rÂ   rÃ   r  r¹   rÄ   rñ   rì   rà   rõ   r  r2  rn  )	r   rj  ro  rR  r  Zdash_lock_filerS  rm  r  rÎ   rÎ   rÏ   Úpytest_unconfigured
  sT    ÿýû
ú
ÿþÿ,$$rp  c                 c   s.  ddl m} ddlm} G dd„ d|ƒ}| jrÞtjrjt| jƒ d¡d  d¡d }|tj	krj| 
¡  |t_	|d	ƒ| j_| jj ¡  d
| jj_d
| jj_d
| jj_| jjtj| jj< | jjV  | jjjrÜ| jj ¡  d| jj_nL|d	ƒ}| ¡  d
|_d
|_d
|_|tj| jj< |V  |j�r*| ¡  d|_dS )z�SeleniumBase as a pytest fixture.
    Usage example: "def test_one(sb):"
    You may need to use this for tests that use other pytest fixtures.r   )ÚBaseCase)Úsession_helperc                       s0   e Zd Z‡ fdd„Z‡ fdd„Zdd„ Z‡  ZS )zsb.<locals>.BaseClassc                    s   t ƒ  ¡  d S r  )ÚsuperÚsetUp©rF  ©Ú	__class__rÎ   rÏ   rt  ¥
  s    zsb.<locals>.BaseClass.setUpc                    s   |   ¡  tƒ  ¡  d S r  )Zsave_teardown_screenshotrs  ÚtearDownru  rv  rÎ   rÏ   rx  ¨
  s    zsb.<locals>.BaseClass.tearDownc                 S   s   d S r  rÎ   ru  rÎ   rÎ   rÏ   Úbase_method¬
  s    z!sb.<locals>.BaseClass.base_method)Ú__name__Ú
__module__Ú__qualname__rt  rx  ry  Ú__classcell__rÎ   rÎ   rv  rÏ   Ú	BaseClass¤
  s   r~  r  rY  ú'ry  TFN)Úseleniumbaserq  rþ   rr  Úclsr»   rˆ   r¯   rh  ræ   Z"end_reused_class_session_as_neededÚsbrt  Ú_needs_tearDownZ_using_sb_fixtureZ_using_sb_fixture_classrç   Únoder  rx  Z_using_sb_fixture_no_class)Úrequestrq  rr  r~  Z	the_classr‚  rÎ   rÎ   rÏ   r‚  œ
  s:    





r‚  c                 c   s$  dt v sdt v rd S | jj d¡}d V }| ¡ }tjr<dt_|�r |jdk�r t	tdƒ�r tj
rÞtjsÞt| ƒ\}}|j}t|ƒdkrœ|d  ¡ |dd …  }|tj|< d	tj|< |tj|< d
tj|< |tjvrÚtj |¡ �ntj�rütrîtsødt v �rü|jdk�sdt|ƒv �rütj�süd
}dt_t	tdƒ�r6tj}tj
�rHt d¡ t	tdƒ�r\t ¡  t	tdƒ�rpt ¡  |jj t_!|jj"t_#d|v�rüd }	t	tdƒ�r¤tj$}	|�r¾|	�r¾t% &|d |	¡ d }
t	tdƒ�rÔtj'}
|�rî|
�rît% (|d |
¡ |�rüt )¡  t*t+ƒ�� d }t	| dƒ�r"| j,j-}n„t	| j.dƒ�s>| j/tj0v �r–t	| j.dƒ�sZtj0| j/ }n| j.j1}| j/}|�srd}||_2|j3�rŽ| 4¡  d|_3|j-}nW d   ƒ d S t5|dg ƒ}t|ƒdk�rØ|d d �rØ|| |_6tj7�r dt8j9j: }|j6 |j6 ;|¡¡ W d   ƒ n1 �s0    Y  d S )Nr×   rØ   ÚhtmlTÚcallr   r˜   r   z*****r   r:  rM  ÚAssertionErrorÚ_test_logpathÚ_add_pytest_html_extraZ_visual_baseline_copiesz#pytest_plugin.BaseClass.base_methodÚ_last_page_sourceÚ_last_page_screenshot_pngr7  r‚  r  FÚextraÚcontentz1<script type="text/javascript" src="%s"></script>)<rº   r   rZ  Z	getpluginZ
get_resultr»   rð   rô   Úwhenrü   r   rò   r  Úoutcomer$  Úupperrè   ré   rê   rë   ró   rÀ   rC  rD  r¯   rï   rä   r‰  Z_process_dashboard_entryrŠ  Z_process_v_baseline_logsÚexcinfoÚvalueZ_excinfo_valueÚtbZ_excinfo_tbr‹  r   Zlog_page_sourcerŒ  Zlog_screenshotZ_log_fail_datar   r¿   r7  Z_html_report_extraÚinstancer  rç   r‚  Z_sb_test_identifierrƒ  rx  rá   Úextrasrõ   r   rû   rb  r†  )r"  r‡  Zpytest_htmlr�  Úreportr	  r
  Z	r_outcomer0   ÚsourceZlast_page_screenshot_pngZextra_reportZsb_noder�  Zrefresh_updatesrÎ   rÎ   rÏ   Úpytest_runtest_makereportÌ
  s¼    ÿþý




ÿþþþý
ýü



ÿÿ

ÿ
ÿÿr™  )1Ú__doc__r§   rÂ   Zpytestr¥   r]  Ú
contextlibr   r€  r   r»   Zseleniumbase.configr   rþ   r   r   Zseleniumbase.fixturesr   r   r>  rC  Úversion_infoZ
PatchPy311ÚPATCHrD  Úargvrº   Z	full_timeZpytest_pluginsrÐ   r  r  r  r  r#  r(  r5  r6  rG  rJ  rK  rT  rn  rp  Zfixturer‚  ÚmarkZhookwrapperr™  rÎ   rÎ   rÎ   rÏ   Ú<module>   sp   
                {#,I.  U8
/