Skip to content

Tracy/Try headed mode to avoid youtube bot detection #719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Aug 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/tabs/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ def add_to_prefs_list():

@pytest.fixture()
def video_url():
return "https://www.youtube.com/watch?v=mAia0v3ojzw"
return "https://www.w3schools.com/html/mov_bbb.mp4"
14 changes: 4 additions & 10 deletions tests/tabs/test_mute_tabs.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import sys
from os import environ

import pytest
from selenium.webdriver import Firefox
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC

from modules.browser_object import TabBar
Expand All @@ -11,6 +11,7 @@
COOKIE_CONSENT_SELECTOR = (
"button[aria-label^='Accept all'], button[aria-label^='Accept the use']"
)
WIN_GHA = environ.get("GITHUB_ACTIONS") == "true" and sys.platform.startswith("win")


@pytest.fixture()
Expand All @@ -23,20 +24,13 @@ def add_to_prefs_list():
return [("network.cookie.cookieBehavior", "2")]


GHA = environ.get("GITHUB_ACTIONS") == "true"


@pytest.mark.unstable(reason="Bug https://bugzilla.mozilla.org/show_bug.cgi?id=1982379")
@pytest.mark.skipif(GHA, reason="Test unstable in Github Actions")
@pytest.mark.skipif(WIN_GHA, reason="Test unstable on Windows in Github Actions")
@pytest.mark.audio
def test_mute_unmute_tab(screenshot, driver: Firefox, video_url: str):
"""C134719, test that tabs can be muted and unmuted"""
tabs = TabBar(driver)
driver.get(video_url)
tabs.expect(EC.title_contains("Top 10"))

play_button = driver.find_element(By.CSS_SELECTOR, PLAY_BUTTON_SELECTOR)
play_button.click()
tabs.expect(EC.title_contains("mov_bbb.mp4"))

with driver.context(driver.CONTEXT_CHROME):
tabs.expect_tab_sound_status(1, tabs.MEDIA_STATUS.PLAYING)
Expand Down
Loading