Skip to content

Commit

Permalink
all_Automation_Git_Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
AmolKadam-Tekdi committed Jul 15, 2024
1 parent 3ba1541 commit 70d2a03
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/all-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
sudo apt-get update
sudo apt-get install -y portaudio19-dev python3-dev
sudo apt-get install -y google-chrome-stable
pip install selenium pytest webdriver-manager
- name: Install Python packages
Expand All @@ -35,7 +37,6 @@ jobs:
pip install pytest-html==3.2.0
pip install pytest-mock==3.11.1
pip install pyaudio
pip install webdriver-manager==3.8.6
pip install selenium pytest gtts comtypes
Expand Down
11 changes: 4 additions & 7 deletions allAutomation/my_project/tests/BrowserManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from selenium.webdriver.chrome.options import Options as ChromeOptions
from webdriver_manager.chrome import ChromeDriverManager


@pytest.fixture(scope="module")
def setup():
# Initialize ChromeOptions
Expand All @@ -22,10 +21,8 @@ def setup():
chrome_options.add_argument("--use-fake-ui-for-media-stream")
chrome_options.add_argument("--use-file-for-fake-audio-capture=output_audio.wav")



# Initialize Chrome WebDriver using WebDriverManager
service = Service(ChromeDriverManager().install())
# Initialize Chrome WebDriver using WebDriverManager with a specific version
service = Service(ChromeDriverManager(version=" 126.0.6478.127").install())
driver = webdriver.Chrome(service=service, options=chrome_options)

driver.maximize_window()
Expand All @@ -34,11 +31,11 @@ def setup():
yield driver

# Teardown - Close the browser
# driver.quit()

driver.quit()

def test_open_website(setup):
driver = setup # Using the WebDriver instance from setup fixture

# Open a website
driver.get('https://d114esnbvw5tst.cloudfront.net/')
assert "Title of the website" in driver.title # Adjust this assertion as needed

0 comments on commit 70d2a03

Please sign in to comment.