From 8ba0971b486d92a8053e6c17ff30f572af942a3f Mon Sep 17 00:00:00 2001 From: AmolKadam-Tekdi Date: Mon, 15 Jul 2024 10:01:37 +0530 Subject: [PATCH] all_Automation_Git_Actions --- allAutomation/.idea/workspace.xml | 3 ++ .../my_project/tests/BrowserManager.py | 38 ++++++++++-------- .../BrowserManager.cpython-312.pyc | Bin 1989 -> 1910 bytes ...imulationTest.cpython-312-pytest-8.2.2.pyc | Bin 6163 -> 6134 bytes .../tests/microphoneSimulationTest.py | 1 - 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/allAutomation/.idea/workspace.xml b/allAutomation/.idea/workspace.xml index 8a1c874c..8e2bdf43 100644 --- a/allAutomation/.idea/workspace.xml +++ b/allAutomation/.idea/workspace.xml @@ -5,7 +5,9 @@ + + diff --git a/allAutomation/my_project/tests/BrowserManager.py b/allAutomation/my_project/tests/BrowserManager.py index 54c92540..3fe45a54 100644 --- a/allAutomation/my_project/tests/BrowserManager.py +++ b/allAutomation/my_project/tests/BrowserManager.py @@ -3,32 +3,36 @@ from selenium.webdriver.chrome.service import Service from selenium.webdriver.chrome.options import Options as ChromeOptions from webdriver_manager.chrome import ChromeDriverManager +from selenium import webdriver +from selenium.webdriver.chrome.service import Service as ChromeService +from selenium.webdriver.chrome.options import Options +from webdriver_manager.chrome import ChromeDriverManager @pytest.fixture(scope="module") def setup(): # Initialize ChromeOptions - chrome_options = ChromeOptions() - chrome_options = webdriver.ChromeOptions() - chrome_options.add_argument('--headless') - chrome_options.add_argument('--no-sandbox') - chrome_options.add_argument('--disable-dev-shm-usage') - chrome_options.add_argument("--remote-debugging-port=9222") - chrome_options.add_argument("--disable-gpu") - chrome_options.add_argument("--remote-allow-origins=*") - chrome_options.add_argument("--incognito") - chrome_options.add_argument("--use-fake-ui-for-media-stream") - chrome_options.add_argument("--use-file-for-fake-audio-capture=output_audio.wav") - - # Specify the ChromeDriver version - service = Service(ChromeDriverManager(version="114.0.5735.90").install()) - driver = webdriver.Chrome(service=service, options=chrome_options) - driver = webdriver.Chrome(service=service, options=chrome_options) + options = Options() + options.add_argument("--headless") # Run Chrome in headless mode + options.add_argument("--no-sandbox") # Bypass OS security model + options.add_argument("--disable-dev-shm-usage") # Overcome limited resource problems + options.add_argument("--remote-debugging-port=9222") + options.add_argument("--disable-gpu") + options.add_argument("--remote-allow-origins=*") + options.add_argument("--incognito") + options.add_argument("--use-fake-ui-for-media-stream") + options.add_argument("--use-file-for-fake-audio-capture=path/to/audio/file.wav") + + # Uncomment and set the correct path to load extension + # options.add_argument("load-extension=path/to/extension") + + driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()), options=options) + yield driver driver.maximize_window() # Return the WebDriver instance for the tests to use - yield driver + # yield driver # Teardown - Close the browser # driver.quit() diff --git a/allAutomation/my_project/tests/__pycache__/BrowserManager.cpython-312.pyc b/allAutomation/my_project/tests/__pycache__/BrowserManager.cpython-312.pyc index a4e522075bf77cba1c067bcf564d77def2c47a02..b1ba539e134870294636886de976ad0f0a8d2091 100644 GIT binary patch delta 821 zcmZ9JO=uHA6vt}JdCwyCA1 zu?QZ#7}k#-^dQuOR1f0Sqk0h}p(`mXfgTGYR9eK|oY|OAd@%EV|2H#l=Dqn8{v8s( zh++Ux+kf@A@UVwjv ztmuOUMaAiow3Ol;uYt*uGJ_qjzF;bP(Mb6Sd!*AL$#PyIvx^!onuKQ|VPuZz8g|5{ zpKP8atP;no6b(~SRVS=T%ZjF~;Cx9b%6ciqkst`O(=t((FfrJxttUuZ@1f8^hw*_< z``}L*90?#Cd8m}f_E4~nqBRuVOxWoBZc9~T7i~0jLSC^^wkledaH#=C8zAd41uC-#0^mB!kq3!;iAQrb?El5} S!1y5#xa5ILSp~aJ5Wz0f_3!IXJ7`r@o%A8WF2KtBFqXS zZ4hM82Hb=Y+y~oS8b$*S|yKl&YJtw6YRKuFulQiaxKo zK6BaD&7>7=c7@4BVj9|PE#L+fRh1PIPZ?U$Cf+#-&y4HSla{S4EfLORe67e08_KF~ z=xdss)|0B4j&g2jzS>WY9F8EKt}d?V~u1{8mIVLBU=ble6GQY(ip{;8?+!$9BZ(mG(ofY z`Vl@!@zfDILI2C%qWJcKAB06JMt8*1WpSt^4(*7;JE4oY8(#&nEcBFwoxbw6o&KF7vgL*Susxo(#DMCU9lvQcIMnxTeEE0 zT-K6uTAQplmNv{yyr7>-t3{{`?+=8OOU diff --git a/allAutomation/my_project/tests/__pycache__/microphoneSimulationTest.cpython-312-pytest-8.2.2.pyc b/allAutomation/my_project/tests/__pycache__/microphoneSimulationTest.cpython-312-pytest-8.2.2.pyc index 5161e3ad4b9720655d5eeb3dbafddff8470da5c0..8eb2950607a370a4077489413d156f581207f8d4 100644 GIT binary patch delta 86 zcmbPi@J*lhG%qg~0}z~FIwh@YBX1%zW7+0>=2eW7&$G&H_GLZI!Kg7=l5Z^|=jL;K pnJkR?n=OQ`nHU>3mxy*ViFh(HN_>i7;$sy0ti;YJTqF!M2mpQS7q