Jump to content

Recommended Posts

Posted

its running but behind the browser one script is running in command prompt which is keep on running with destroying results, not sure what it is.

Posted

i removed the 2nd one, but when i am running the script , background in Command shell so many scripts are running until i am not manually closing the Command shell..not sure why it is running behind the browser..any idea.

Posted

This is my script now, any changes in order or anything need to add.

 

#include "wd_core.au3"
#include "wd_helper.au3"


Local $sDesiredCapabilities, $sSession, $sElement

SetupEdge()
_WD_Startup()
$sSession = _WD_CreateSession($sDesiredCapabilities)
_WD_Navigate($sSession, "https://www.google.com")

Func SetupEdge()
_WD_Option('Driver', 'msedgedriver.exe')
_WD_Option('Port', 9515)
_WD_Option('DriverParams', '--verbose')

$sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"binary": "' & StringReplace (@ProgramFilesDir, "\", "/") & '/Microsoft/Edge/Application/msedge.exe", "excludeSwitches": [ "enable-automation"], "useAutomationExtension": false}}}}'
EndFunc

Posted

@MRAJ I'm not sure that I understand your concern. Does the script run successfully for you? Why are you so focused on the webdriver console? I explained above how you can hide it if it bothers you so much.

When exiting your script, you should be cleaning up with something like this --

_WD_DeleteSession($sSession)
_WD_Shutdown()

That will close the browser session and remove the webdriver console.

Posted

Thanks script is running and opening the browser

Sorry i didnt see your old post.. now i configured the script as below to hide the Webdriver console using _WD_ConsoleVisible(), but still console is running behind and closing after the browser shut down.

Is there any way to hide the console. 

 

 

#include "wd_core.au3"
#include "wd_helper.au3"


Local $sDesiredCapabilities, $sSession, $sElement
_WD_ConsoleVisible()
SetupEdge()
_WD_Startup()
$sSession = _WD_CreateSession($sDesiredCapabilities)
_WD_Navigate($sSession, "https://www.google.com")

Func SetupEdge()
_WD_Option('Driver', 'msedgedriver.exe')
_WD_Option('Port', 9515)
_WD_Option('DriverParams', '--verbose')

$sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"binary": "' & StringReplace (@ProgramFilesDir, "\", "/") & '/Microsoft/Edge/Application/msedge.exe", "excludeSwitches": [ "enable-automation"], "useAutomationExtension": false}}}}'

EndFunc

_WD_DeleteSession($sSession)
_WD_Shutdown()

Posted
Posted
#include "wd_core.au3"
#include "wd_helper.au3"


Local $sDesiredCapabilities, $sSession, $sElement

SetupEdge()
_WD_Startup()
Sleep(2000)
_WD_ConsoleVisible()
$sSession = _WD_CreateSession($sDesiredCapabilities)
_WD_Navigate($sSession, "https://www.google.com")

Func SetupEdge()

_WD_Option('Driver', 'msedgedriver.exe')
_WD_Option('Port', 9515)
_WD_Option('DriverParams', '--verbose')

$sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"binary": "' & StringReplace (@ProgramFilesDir, "\", "/") & '/Microsoft/Edge/Application/msedge.exe", "excludeSwitches": [ "enable-automation"], "useAutomationExtension": false}}}}'

EndFunc

_WD_DeleteSession($sSession)
_WD_Shutdown()

I tried the above script and changed Sleep(2000), still first Console is opening and wait for 2 seconds then browser is opening.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...