-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[py][bidi]: add emulation command set_user_agent_override
#16595
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
Conversation
PR Compliance Guide 🔍(Compliance updated until commit a9ae8a1)Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label Previous compliance checksCompliance check up to commit fcc1b83
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
cgoldberg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 very minor things mentioned in my review.. besides that, LGTM!
…y-user-agent-override
User description
🔗 Related Issues
💥 What does this PR do?
Adds support for the
set_user_agent_overridecommand in the emulation module - https://w3c.github.io/webdriver-bidi/#command-emulation-setUserAgentOverride🔧 Implementation Notes
Usage:
💡 Additional Considerations
🔄 Types of changes
PR Type
Enhancement
Description
Adds
set_user_agent_overridecommand to emulation moduleSupports overriding user agent for contexts or user contexts
Includes validation to prevent conflicting parameter combinations
Adds comprehensive test coverage for both context types
Diagram Walkthrough
File Walkthrough
emulation.py
Add set_user_agent_override emulation commandpy/selenium/webdriver/common/bidi/emulation.py
set_user_agent_overridemethod following W3C WebDriver BiDispecification
user_agentparameter to set or clear overridecontextsoruser_contextsparameter (mutuallyexclusive)
bidi_emulation_tests.py
Add user agent override tests for contexts and user contextspy/test/selenium/webdriver/common/bidi_emulation_tests.py
get_browser_user_agentto retrieve current useragent via script evaluation
test_set_user_agent_override_with_contextsto verifyoverride with browsing contexts
test_set_user_agent_override_with_user_contextsto verifyoverride with user contexts
to initial value)