mozilla / geckodriver

WebDriver for Firefox
https://firefox-source-docs.mozilla.org/testing/geckodriver/
Mozilla Public License 2.0
7.08k stars 1.52k forks source link

[🐛 Bug]: fullscreen_window() in combination with options.set_preference("full-screen-api.ignore-widgets", True) is not working #1999

Open tissi-2 opened 2 years ago

tissi-2 commented 2 years ago

System

Testcase

options=Options()
options.Profile='C:/Users/Tissi/AppData/Roaming/Mozilla/Firefox/Profiles/xx513scw.Selenium_Test'
options.binary_location = 'C:/Program Files/Mozilla Firefox/firefox.exe'
options.set_preference("full-screen-api.ignore-widgets", True)
options.log.level = "trace"
service = Service(r'C:\Python310x64\geckodriver')
driver = webdriver.Firefox(service=service, options=options)
driver.maximize_window()
driver.fullscreen_window()

This code ended up in a "small" windowed firefox with a fixed size although it should have ended up in a fullscreen window.

Stacktrace

No error recorded by client

Trace-level log

1648197639874 Marionette TRACE Received observer notification marionette-startup-requested 1648197639875 Marionette TRACE Waiting until startup recorder finished recording startup scripts... DevTools listening on ws://localhost:32272/devtools/browser/2cc9c082-3c76-4e3c-88c5-573f0342963a 1648197639917 Marionette TRACE All scripts recorded. 1648197639917 RemoteAgent DEBUG Setting recommended pref dom.disable_beforeunload to true 1648197639921 Marionette INFO Listening on port 32277 1648197639922 Marionette DEBUG Marionette is listening 1648197640259 Marionette DEBUG Accepted connection 0 from 127.0.0.1:32294 1648197640263 geckodriver::marionette DEBUG Connection to Marionette established on 127.0.0.1:32277. 1648197640274 Marionette DEBUG 0 -> [0,1,"WebDriver:NewSession",{"acceptInsecureCerts":true,"browserName":"firefox","pageLoadStrategy":"normal"}] 1648197640280 RemoteAgent WARN TLS certificate errors will be ignored for this session 1648197640293 RemoteAgent TRACE [17] Document already finished loading: about:blank 1648197640300 Marionette DEBUG 0 <- [1,1,null,{"sessionId":"8cfb7183-bee3-49c3-8480-1a2d01c6657b","capabilities":{"browserName":"firefox","browserVersion":"98.0. ... ofileejbfhi","moz:shutdownTimeout":60000,"moz:useNonSpecCompliantPointerOrigin":false,"moz:webdriverClick":true,"proxy":{}}}] 1648197640304 webdriver::server DEBUG <- 200 OK {"value":{"sessionId":"8cfb7183-bee3-49c3-8480-1a2d01c6657b","capabilities":{"acceptInsecureCerts":true,"browserName":"firefox","browserVersion":"98.0.2","moz:accessibilityChecks":false,"moz:buildID":"20220322144853","moz:debuggerAddress":"localhost:32272","moz:geckodriverVersion":"0.30.0","moz:headless":false,"moz:processID":17132,"moz:profile":"C:\Users\Tissi\AppData\Local\Temp\rust_mozprofileejbfhi","moz:shutdownTimeout":60000,"moz:useNonSpecCompliantPointerOrigin":false,"moz:webdriverClick":true,"pageLoadStrategy":"normal","platformName":"windows","platformVersion":"10.0","proxy":{},"setWindowRect":true,"strictFileInteractability":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"unhandledPromptBehavior":"dismiss and notify"}}} 1648197640308 webdriver::server DEBUG -> POST /session/8cfb7183-bee3-49c3-8480-1a2d01c6657b/window/maximize {} 1648197640311 Marionette DEBUG 0 -> [0,2,"WebDriver:MaximizeWindow",{}] 1648197640564 Marionette DEBUG 0 <- [1,2,null,{"x":-8,"y":-8,"width":2576,"height":1416}] 1648197640565 webdriver::server DEBUG <- 200 OK {"value":{"x":-8,"y":-8,"width":2576,"height":1416}} 1648197640568 webdriver::server DEBUG -> POST /session/8cfb7183-bee3-49c3-8480-1a2d01c6657b/window/fullscreen {} 1648197640569 Marionette DEBUG 0 -> [0,3,"WebDriver:FullscreenWindow",{}] 1648197645579 Marionette WARN TimedPromise timed out after 5000 ms: stacktrace: TimedPromise/<@chrome://remote/content/marionette/sync.js:235:19 TimedPromise@chrome://remote/content/marionette/sync.js:220:10 GeckoDriver.prototype.fullscreenWindow@chrome://remote/content/marionette/driver.js:2395:11 1648197645580 Marionette DEBUG 0 <- [1,3,null,{"x":4,"y":4,"width":1296,"height":1079}] 1648197645581 webdriver::server DEBUG <- 200 OK {"value":{"x":4,"y":4,"width":1296,"height":1079}} 1648197645584 webdriver::server DEBUG -> POST /session/8cfb7183-bee3-49c3-8480-1a2d01c6657b/url {"url": "https://MnLZ53sTau4:Zz%21%3F3aT75r%2F3@xxxx"} 1648197645585 Marionette DEBUG 0 -> [0,4,"WebDriver:Navigate",{"url":"https://MnLZ53sTau4:Zz%21%3F3aT75r%2F3@xxxx"}]

whimboo commented 2 years ago

Does the same happening when you start Firefox manually with maybe your daily profile which also has this preference set? When you maximize Firefox first and then put it into fullscreen what happens?

tissi-2 commented 2 years ago

With the mentioned setting and running my daily profile: