Jump to content

Recommended Posts

Posted (edited)

QUESTION:

  On 9/3/2021 at 11:53 AM, Danp2 said:

Shouldn't the commas in your JSON come at the end of the line rather than the beginning? Might just be a style thing.

Expand  

ANSWER:
I change my codding habbits not only for JSON but mainly for SQL statements.
I such case you see if you use COMMA or if you forget to use them.
This prevents a syntax error.


QUESTION:

  On 9/3/2021 at 11:53 AM, Danp2 said:

Do you plan to add support for "excludeSwitches"?

Expand  

ANSWER:
What you mean ?

QUESTION:

  On 9/3/2021 at 11:53 AM, Danp2 said:

How would you build something like this? 

  • {"capabilities": {"alwaysMatch": {"browserName": "firefox", "acceptInsecureCerts":true}}}
Expand  

ANSWER:
hm....
I made small mod in UDF and now it is possible to:

_Example()
Func _Example()
    _WD_Capabilities_Startup()
    _WD_Capabilities_AddOption('browserName', 'firefox')
    _WD_Capabilities_AddOption('acceptInsecureCerts', True)
    Local $s_Desired_Capabilities = _WD_Capabilities_Build_JSON('')
    ........
EndFunc   ;==>_Example

and result:
 

{"capabilities":
    {
        "alwaysMatch": 
        {
            {
                "browserName": "firefox"
                ,"acceptInsecureCerts": true
            }
        }   
    }
}

Is that what you want to achieve ?

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 9/3/2021 at 1:35 PM, mLipok said:

I such case you see if you use COMMA or if you forget to use them.
This prevents a syntax error.

Expand  

Not sure that I follow you. How would this syntax error avoidance apply to JSON?

  On 9/3/2021 at 1:35 PM, mLipok said:
  On 9/3/2021 at 11:53 AM, Danp2 said:

Do you plan to add support for "excludeSwitches"?

Expand  

ANSWER:
What you mean ?

Expand  

You can look in wd_demo for examples or search the forum. 🙄🙂

 

  On 9/3/2021 at 1:35 PM, mLipok said:
{"capabilities":
    {
        "alwaysMatch": 
        {
            {
                "browserName": "firefox"
                ,"acceptInsecureCerts": true
            }
        }   
    }
}

Is that what you want to achieve ?

Expand  

Yes... except for the misplaced comma. 😁

Posted
  On 9/3/2021 at 1:35 PM, mLipok said:

I made small mod in UDF

Expand  

change this follwing _WD_Capabilities_Build_JSON() snippet in the way:

Func _WD_Capabilities_Build_JSON($s_Browser_type)
    Local $s_WD_Capabilities_OptionType = ''
    If StringInStr($s_Browser_type, 'chrome') Then
        $s_WD_Capabilities_OptionType = 'goog:chromeOptions'
    ElseIf StringInStr($s_Browser_type, 'firefox') Then
        $s_WD_Capabilities_OptionType = 'moz:firefoxOptions'
    ElseIf StringInStr($s_Browser_type, 'edge') Then
        $s_WD_Capabilities_OptionType = 'ms:edgeOptions'
    ElseIf $s_Browser_type <> '' Then
        Return SetError(1)
    EndIf
    .....

There was:

Else
        Return SetError(1)
    EndIf

and now is:
 

ElseIf $s_Browser_type <> '' Then
        Return SetError(1)
    EndIf

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 9/3/2021 at 1:55 PM, mLipok said:

change this follwing _WD_Capabilities_Build_JSON() snippet in the way:

Expand  

I'm not sure that is the ideal solution. What if I want to do this?

{"capabilities":
    {
        "alwaysMatch": 
        {
            {
                "acceptInsecureCerts": true
                ,"moz:firefoxOptions":
                {
                    "args":
                        [
                            "-profile"
                            ,"c:\\Users\\Username\\AppData\\Local\\Mozilla\\Firefox\\Profiles\\TESTING.default"
                        ]
                }
            }
        }   
    }
}

 

Posted (edited)
  On 9/3/2021 at 1:54 PM, Danp2 said:

Not sure that I follow you. How would this syntax error avoidance apply to JSON?

Expand  

No way. This prevents human error.

According to the following maxim :
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
 

As far as I understand you, the following example snippet is a normal "standard" way of writing JSON strings, which you referes

,"prefs":
                    {
                        "dom.ipc.processCount": "8",
                        "javascript.options.showInConsole": "false",
                        "browser.toolbars.bookmarks.visibility": "always",
                        "app.update.download.attempts": "0",
                        "browser.safebrowsing.downloads.enabled": "false"
                    }


this following code snippet is easier to understand and maintain

,"prefs":
                    {
                        "dom.ipc.processCount": "8"
                        ,"javascript.options.showInConsole": "false"
                        ,"browser.toolbars.bookmarks.visibility": "always"
                        ,"app.update.download.attempts": "0"
                        ,"browser.safebrowsing.downloads.enabled": "false"
                    }

because every time you start a new line, you see a separator (comma) at start and then you do not must worry about if this comma was added before the last line.
It's just as much easier to add new lines to the end of the set because you don't have a separator at the end.

btw.
Here is example how I create my SQL Statements:
 

Local $sQuery = _
            "SELECT" & @CRLF & _
            "   DB_NAME(database_id) AS [DatabaseName]" & @CRLF & _
            "   ,[Name] AS [Logical_Name]" & @CRLF & _
            "   ,[Physical_Name]" & @CRLF & _
            "   ,[size] AS [Size_BLOCK]" & @CRLF & _
            "   ,([size]*8) [Size_Human]" & @CRLF & _
            "   ,[state_desc] AS [Status_bazy]" & @CRLF & _
            "FROM" & @CRLF & _
            "   sys.[master_files]" & @CRLF & _
            "ORDER BY" & @CRLF & _
            "   [DatabaseName]" & @CRLF & _
            ""

 

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 9/3/2021 at 1:54 PM, Danp2 said:

You can look in wd_demo for examples or search the forum. 🙄🙂

 

Expand  

Sure. Will look in next comming days.

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 9/3/2021 at 2:09 PM, Danp2 said:

I'm not sure that is the ideal solution. What if I want to do this?

{"capabilities":
    {
        "alwaysMatch": 
        {
            {
                "acceptInsecureCerts": true
                ,"moz:firefoxOptions":
                {
                    "args":
                        [
                            "-profile"
                            ,"c:\\Users\\Username\\AppData\\Local\\Mozilla\\Firefox\\Profiles\\TESTING.default"
                        ]
                }
            }
        }   
    }
}

 

Expand  

 

try this:

Func _Example_Danp2()
    _WD_Capabilities_Startup()
    _WD_Capabilities_AddOption('browserName', 'firefox')
    _WD_Capabilities_AddOption('acceptInsecureCerts', True)

    Local $s_My_Profile_Dir = @ScriptDir & '\WD_Testing_Profile'
    _WD_Capabilities_AddArgument('-profile')
    _WD_Capabilities_AddArgument($s_My_Profile_Dir)

    Local $s_Desired_Capabilities = _WD_Capabilities_Build_JSON('')

    ConsoleWrite($s_Desired_Capabilities & @CRLF)
    ConsoleWrite('=============' & @CRLF)

    Exit

    _WD_Option('Driver', 'geckodriver.exe')
    _WD_Option('Port', 4444)
    _WD_Startup()
    Local $WD_SESSION = _WD_CreateSession($s_Desired_Capabilities)
    MsgBox($MB_OK + $MB_TOPMOST + $MB_ICONINFORMATION, "Information #" & @ScriptLineNumber, "Waiting before _WD_Shutdown()")
    _WD_DeleteSession($WD_SESSION)
    _WD_Shutdown()
EndFunc   ;==>_Example_FireFox

 

REMARK:
Do not forget to update _WD_Capabilities_Build_JSON()

  On 9/3/2021 at 1:55 PM, mLipok said:

change this follwing _WD_Capabilities_Build_JSON() snippet in the way:

Func _WD_Capabilities_Build_JSON($s_Browser_type)
    Local $s_WD_Capabilities_OptionType = ''
    If StringInStr($s_Browser_type, 'chrome') Then
        $s_WD_Capabilities_OptionType = 'goog:chromeOptions'
    ElseIf StringInStr($s_Browser_type, 'firefox') Then
        $s_WD_Capabilities_OptionType = 'moz:firefoxOptions'
    ElseIf StringInStr($s_Browser_type, 'edge') Then
        $s_WD_Capabilities_OptionType = 'ms:edgeOptions'
    ElseIf $s_Browser_type <> '' Then
        Return SetError(1)
    EndIf
    .....

There was:

Else
        Return SetError(1)
    EndIf

and now is:

ElseIf $s_Browser_type <> '' Then
        Return SetError(1)
    EndIf

 

Expand  

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

@mLipok This is the output I received --

{"capabilities":
    {
        "alwaysMatch": 
        {
            {
                "browserName": "firefox"
                ,"acceptInsecureCerts": true
                ,"args":
                    [
                        "-profile"
                        ,"C:\Users\DanPollak\Dropbox\webdriver\WD_Testing_Profile"
                    ]
            }
        }   
    }
}

I haven't tested it, but I don't think this will work because the "args" portion should appear within the "moz:firefoxOptions" tag, correct?

Posted (edited)

I'was confused reading your last post. But I found out where the isue was... In my reading ;)

A few posts earlier you ask me about:

  On 9/3/2021 at 11:53 AM, Danp2 said:
  • How would you build something like this? 
    • {"capabilities": {"alwaysMatch": {"browserName": "firefox", "acceptInsecureCerts":true}}}
Expand  

The problem was that in last example I use example from my previous answer, where I not used "moz:firefoxOptions" tag, because he was'nt requested there by you.

 

  On 9/3/2021 at 2:30 PM, Danp2 said:

the "args" portion should appear within the "moz:firefoxOptions" tag, correct?

Expand  

Yes, simply use:

Local $s_Desired_Capabilities = _WD_Capabilities_Build_JSON('firefox')

instead:

Local $s_Desired_Capabilities = _WD_Capabilities_Build_JSON('')


You must to remember that _WD_Capabilities_Build_JSON() function not validate JSON with WebDriver requirements.

To validate a JSON string with WebDriver requirements, you need to use:

Local $WD_SESSION = _WD_CreateSession($s_Desired_Capabilities)

 

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 9/3/2021 at 2:53 PM, Danp2 said:

The following should be outside of "moz:firefoxOptions" --

Expand  

Working on a fix

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

I think I need to correct the nomenclature.

Refering to:
https://developer.mozilla.org/en-US/docs/Web/WebDriver/Capabilities
 

I think I need to correct the nomenclature.
A little.

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

Do we need the verb "Add" in the function name?

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

New version wd_capabilities.zip

#include "wd_helper.au3"
#include "wd_capabilities.au3"

_Example()
Exit

Func _Example()
    ConsoleWrite("! " & @ScriptLineNumber & " ===============" & @CRLF)
    _Example_Danp2()
    ConsoleWrite("! " & @ScriptLineNumber & " ===============" & @CRLF)

    If $IDYES = MsgBox($MB_YESNO + $MB_TOPMOST + $MB_ICONQUESTION + $MB_DEFBUTTON1, "Question", _
            "Do you want to test with running browsers ?") Then
        Local $b_Headless = ($IDYES = MsgBox($MB_YESNO + $MB_TOPMOST + $MB_ICONQUESTION + $MB_DEFBUTTON1, "Question", "Do you want to test with headless mode ?"))
        _Example_Chrome(True, $b_Headless)
        ConsoleWrite("! " & @ScriptLineNumber & " ===============" & @CRLF)
        _Example_FireFox(True, $b_Headless)
        ConsoleWrite("! " & @ScriptLineNumber & " ===============" & @CRLF)
    Else ; only show $s_Desired_Capabilities in console
        _Example_Chrome(False)
        ConsoleWrite("! " & @ScriptLineNumber & " ===============" & @CRLF)
        _Example_FireFox(False)
        ConsoleWrite("! " & @ScriptLineNumber & " ===============" & @CRLF)
    EndIf
EndFunc   ;==>_Example

Func _Example_Chrome($b_Run_Browser, $b_Headless = False)
    _WD_Capabilities_Startup()
    _WD_Capabilities_Capability('browserName', 'chrome')
    _WD_Capabilities_Option('w3c', True)
    If $b_Headless Then _
            _WD_Capabilities_Argument('--headless')
    _WD_Capabilities_Argument('start-maximized')
    _WD_Capabilities_Argument('disable-infobars')
    _WD_Capabilities_Argument('user-data-dir', 'C:\Users\' & @UserName & '\AppData\Local\Google\Chrome\User Data\Default')
    _WD_Capabilities_Preference('download.default_directory', @ScriptDir)

    Local $s_Desired_Capabilities = _WD_Capabilities_Build('chrome')
    ConsoleWrite($s_Desired_Capabilities & @CRLF)
    ConsoleWrite('! =============' & @CRLF)
    If Not $b_Run_Browser Then Return

    _WD_Option('Driver', 'chromedriver.exe')
    _WD_Option('Port', 9515)
    _WD_Startup()
    Local $WD_SESSION = _WD_CreateSession($s_Desired_Capabilities)
    MsgBox($MB_OK + $MB_TOPMOST + $MB_ICONINFORMATION, "Information #" & @ScriptLineNumber, "Waiting before _WD_Shutdown()")
    _WD_DeleteSession($WD_SESSION)
    _WD_Shutdown()
EndFunc   ;==>_Example_Chrome

Func _Example_FireFox($b_Run_Browser, $b_Headless = False)
    _WD_Capabilities_Startup()
    _WD_Capabilities_Capability('browserName', 'firefox')
    #TODO 'binary'
;~  _WD_Capabilities_Option('binary', 'c:\Program Files (x86)\Mozilla Firefox\firefox.exe')
    If $b_Headless Then _
            _WD_Capabilities_Argument('--headless')
    Local $s_My_Profile_Dir = 'c:\Users\' & @UserName & '\AppData\Local\Mozilla\Firefox\Profiles\TESTING.default'
    _WD_Capabilities_Argument('-profile')
    _WD_Capabilities_Argument($s_My_Profile_Dir)

    _WD_Capabilities_Preference('dom.ipc.processCount', 8)
    _WD_Capabilities_Preference('javascript.options.showInConsole', False)
    _WD_Capabilities_Preference('browser.toolbars.bookmarks.visibility', 'always') ; check    about:config
    _WD_Capabilities_Preference('app.update.download.attempts', 0) ; check    about:config
    _WD_Capabilities_Preference('browser.safebrowsing.downloads.enabled', False) ; check    about:config

    _WD_Capabilities_Log('level', 'trace')

    _WD_Capabilities_Env('MOZ_LOG', 'nsHttp:5')
    _WD_Capabilities_Env('MOZ_LOG_FILE', $s_My_Profile_Dir & '\log')

    Local $s_Desired_Capabilities = _WD_Capabilities_Build('firefox')
    ConsoleWrite($s_Desired_Capabilities & @CRLF)
    ConsoleWrite('! =============' & @CRLF)
    If Not $b_Run_Browser Then Return

    _WD_Option('Driver', 'geckodriver.exe')
    _WD_Option('Port', 4444)
    _WD_Startup()
    Local $WD_SESSION = _WD_CreateSession($s_Desired_Capabilities)
    MsgBox($MB_OK + $MB_TOPMOST + $MB_ICONINFORMATION, "Information #" & @ScriptLineNumber, "Waiting before _WD_Shutdown()")
    _WD_DeleteSession($WD_SESSION)
    _WD_Shutdown()
EndFunc   ;==>_Example_FireFox

Func _Example_Danp2()
    _WD_Capabilities_Startup()
    _WD_Capabilities_Capability('browserName', 'firefox')
    _WD_Capabilities_Capability('acceptInsecureCerts', True)

    Local $s_My_Profile_Dir = @ScriptDir & '\WD_Testing_Profile'
    _WD_Capabilities_Argument('-profile')
    _WD_Capabilities_Argument($s_My_Profile_Dir)

    Local $s_Desired_Capabilities = _WD_Capabilities_Build('firefox')

    ConsoleWrite($s_Desired_Capabilities & @CRLF)
    ConsoleWrite('=============' & @CRLF)

    Return

    _WD_Option('Driver', 'geckodriver.exe')
    _WD_Option('Port', 4444)
    _WD_Startup()
    Local $WD_SESSION = _WD_CreateSession($s_Desired_Capabilities)
    MsgBox($MB_OK + $MB_TOPMOST + $MB_ICONINFORMATION, "Information #" & @ScriptLineNumber, "Waiting before _WD_Shutdown()")
    _WD_DeleteSession($WD_SESSION)
    _WD_Shutdown()
EndFunc   ;==>_Example_Danp2

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)

using this :
https://help.applitools.com/hc/en-us/articles/360007189411--Chrome-is-being-controlled-by-automated-test-software-notification

as an example:

capabilities: {
        'browserName': 'chrome',
        'chromeOptions': {
            'excludeSwitches': ['enable-automation']
        }
    },

 

Will this following concept fit your needs ?

Global $a_ExcludeSwitches_List[1] = ['enable-automation']
_WD_Capabilities_ExcludeSwitches($a_ExcludeSwitches_List)
ConsoleWrite("! " & _WD_Capabilities_ExcludeSwitches(Default) & @CRLF)

Func _WD_Capabilities_ExcludeSwitches($a_ExcludeSwitches_List)
    Local Static $s_ExcludeSwitches = ''
    If $a_ExcludeSwitches_List = Default Then Return $s_ExcludeSwitches
    If UBound($a_ExcludeSwitches_List) = 0 Then Return SetError(1, 0, '')

    For $IDX_Switch = 0 To UBound($a_ExcludeSwitches_List) - 1
        If $IDX_Switch > 0 Then $s_ExcludeSwitches &= ':'
        $s_ExcludeSwitches &= '"' & $a_ExcludeSwitches_List[$IDX_Switch] & '"'
    Next
    $s_ExcludeSwitches = '"excludeSwitches": ' & '[' & $s_ExcludeSwitches & ']'
EndFunc   ;==>_WD_Capabilities_ExcludeSwitches

 

or even better:
https://stackoverflow.com/questions/58694072/use-two-excludeswitches-when-launching-selenium-chromedriver
 

Global $a_ExcludeSwitches_List[2] = ['enable-automation', 'load-extension']
_WD_Capabilities_ExcludeSwitches($a_ExcludeSwitches_List)
ConsoleWrite("! " & _WD_Capabilities_ExcludeSwitches(Default) & @CRLF)

Func _WD_Capabilities_ExcludeSwitches($a_ExcludeSwitches_List)
    Local Static $s_ExcludeSwitches = ''
    If $a_ExcludeSwitches_List = Default Then Return $s_ExcludeSwitches
    If UBound($a_ExcludeSwitches_List) = 0 Then Return SetError(1, 0, '')

    For $IDX_Switch = 0 To UBound($a_ExcludeSwitches_List) - 1
        If $IDX_Switch > 0 Then $s_ExcludeSwitches &= ':'
        $s_ExcludeSwitches &= '"' & $a_ExcludeSwitches_List[$IDX_Switch] & '"'
    Next
    $s_ExcludeSwitches = '"excludeSwitches": ' & '[' & $s_ExcludeSwitches & ']'
EndFunc   ;==>_WD_Capabilities_ExcludeSwitches


 

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

@mLipokI believe the Capacities string is generated correctly now. I haven't examined the underlying code yet. However, I would like to make a few observations / suggestions --

  • Would it make sense to provide the user with a single function to add options and use a parameter to control where it gets stored (ie: Argument, Preference, etc)? That might be easier to remember than multiple _WD_Capabilities_* function names.
  • In fact, you may be able to reduce everything down to a single function named _WD_Capabilities. Thoughts?
Posted (edited)
  On 9/3/2021 at 4:43 PM, Danp2 said:

@mLipokI believe the Capacities string is generated correctly now. I haven't examined the underlying code yet. However, I would like to make a few observations / suggestions --

  • Would it make sense to provide the user with a single function to add options and use a parameter to control where it gets stored (ie: Argument, Preference, etc)? That might be easier to remember than multiple _WD_Capabilities_* function names.
  • In fact, you may be able to reduce everything down to a single function named _WD_Capabilities. Thoughts?
Expand  

something like this:
 

Global Enum _
        $_WD_CAPS__STARTUP = 11001, _
        $_WD_CAPS__ADD_CAPABILITY, _
        $_WD_CAPS__ADD_EXCLUSION, _
        $_WD_CAPS__ADD_OPTION, _
        $_WD_CAPS__ADD_ARGUMENT, _
        $_WD_CAPS__ADD_PREFERENCE, _
        $_WD_CAPS__ADD_LOG, _
        $_WD_CAPS__ADD_ENV, _
        $_WD_CAPS__BUILD, _
        $_WD_CAPS__COUNTER, _
        

_Example()

Func _Example()
    _WD_Capabilities($_WD_CAPS__STARTUP)
    _WD_Capabilities($_WD_CAPS__ADD_*, ......)
    _WD_Capabilities($_WD_CAPS__ADD_*, ......)
    _WD_Capabilities($_WD_CAPS__ADD_*, ......)
    _WD_Capabilities($_WD_CAPS__ADD_*, ......)
    _WD_Capabilities($_WD_CAPS__ADD_*, ......)
    Local $s_Desired_Capabilities = _WD_Capabilities($_WD_CAPS__BUILD)
    ....
    Local $WD_SESSION = _WD_CreateSession($s_Desired_Capabilities)
    ...
EndFunc   ;==>_Example

 

;)

 

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Guest
This topic is now closed to further replies.
×
×
  • Create New...