SEKOMD Posted June 18 Share Posted June 18 (edited) Hello everyone! I need a window with a title that loads a website (in the future, it will just have a text field as I'm creating a text editor on different engines). I managed to achieve this in Chrome and Edge, but in Opera, it's not working. The --app parameter in Opera doesn't work. Could you please advise me? Maybe I'm not launching it correctly, or perhaps there is another parameter? Just need to launch Opera window without tabs, address bar, and with a loaded website like Google, for instance. expandcollapse popup#include "wd_core.au3" #include "wd_capabilities.au3" #include "wd_helper.au3" Global $sBrowserType = 'Chrome' ;it works ;Global $sBrowserType = 'Opera' ;doesn't work $_WD_GetFreePort = _WD_GetFreePort() If $sBrowserType = 'Opera' Then _WD_Option('Driver', 'operadriver.exe') Else _WD_Option('Driver', 'chromedriver.exe') EndIf _WD_Option('Port', $_WD_GetFreePort) _WD_Option('DriverParams', '--verbose --log trace --port=' & $_WD_GetFreePort) _WD_CapabilitiesStartup() If $sBrowserType = 'Opera' Then _WD_CapabilitiesAdd('alwaysMatch', 'opera') Else _WD_CapabilitiesAdd('alwaysMatch', 'chrome') EndIf _WD_CapabilitiesAdd('browserName', 'chrome') _WD_CapabilitiesAdd('w3c', True) _WD_CapabilitiesAdd('acceptInsecureCerts', True) ;This parameter should keep the window title, the window itself, and the actual site. ;It works in Chrome but doesn't work in Opera. _WD_CapabilitiesAdd('args', '--app=https://myip.com') ;<<!? _WD_Startup() $sSession = _WD_CreateSession(_WD_CapabilitiesGet()) ;_WD_Navigate($sSession, 'https://myip.com') MsgBox(64, '', 'Wait') _WD_DeleteSession($sSession) _WD_Shutdown() Exit Can someone please help me out? Does anyone have any ideas? Applying these settings (almost forcibly): _WD_Option('Driver', 'chromedriver.exe') _WD_CapabilitiesAdd('binary', 'C:\Users\EM\AppData\Local\Programs\Opera\opera.exe') ;forced Still didn't have any effect. Edited June 18 by SEKOMD Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now