Jump to content

WebDriver UDF - Help & Support (III)


Danp2
 Share

Recommended Posts

2 hours ago, minhuy said:

Hello everyone. i am using an application that requires cURL input to be able to run the program. currently it takes time to get cURL manually, is there any way I can get cURL quickly? i can login the website using webdriver

1.png

If you have ever encountered with software called postman it has a very good code generator for php curl and many other languages...

U can jus use that whole code and edit...

Its faster compared to writing the whole code...

Link to comment
Share on other sites

On 2/23/2022 at 11:24 PM, n3wbie said:

I can use non compiled version to test...

Also I can share system via anydesk if required

I have system access .as the error is at my own place...

I ll download latest version...

I didn't change whole of udf as I had changed some of desired capabilities args as per my requirements.

Will test tomorrow and repost the results again

 

 

>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "G:\GIT\Vinfur 2\Vinfur-2\Application\Itax.au3" /UserParams    
+>13:43:32 Starting AutoIt3Wrapper (19.1127.1402.0} from:SciTE.exe (4.2.0.0)  Keyboard:00000409  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64  Environment(Language:0409)  CodePage:0  utf8.auto.check:4
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\COMP\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\COMP\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.14.5)  from:C:\Program Files (x86)\AutoIt3  input:G:\GIT\Vinfur 2\Vinfur-2\Application\Itax.au3
+>13:43:34 AU3Check ended.rc:0
>Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3.exe "G:\GIT\Vinfur 2\Vinfur-2\Application\Itax.au3"    
+>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+BREAK to Stop.

"G:\GIT\Vinfur 2\Vinfur-2\Application\wd_helper1.au3" (1419) : ==> The requested action with this object has failed.:
$oShell.NameSpace($sInstallDir).CopyHere($FileItem, 20)
$oShell.NameSpace($sInstallDir)^ ERROR
->13:43:44 AutoIt3.exe ended.rc:1
+>13:43:44 AutoIt3Wrapper Finished.
>Exit code: 1    Time: 12.37


 

if $a=="Chrome" Then
    _WD_UpdateDriver('Chrome', $basedir & "/Dependencies/")
    $desiredcap = SetupChrome()
Elseif $a=="Firefox" then
    _WD_UpdateDriver('Firefox', $basedir & "/Dependencies/")
    $desiredcap = SetupGecko(0)
EndIf

This Is lates Version Code as Posted.

Getting Following Error

Link to comment
Share on other sites

Thanks @mLipok for getting things corrected and helping find the error

The issue was with typing of path to chrome driver in update parameter which led to the following error.

The issue can be replicated by the following modified function in the wd_demo file with gecko /Firefox version.

the main issue is because of the use of slash instead of backslash.

Func SetupGecko($bHeadless)
    _WD_Option('Driver', 'geckodriver.exe')
    _WD_Option('DriverParams', '--log trace')
    _WD_Option('Port', 4444)
    Local $sDirectory = @ScriptDir & '/Dependencies/'
    DirCreate($sDirectory)
    ConsoleWrite("! " & FileExists($sDirectory) & @CRLF)
    ConsoleWrite("! " & $sDirectory & @CRLF)
    _WD_UpdateDriver('Firefox', $sDirectory, False, True)
    MsgBox(0, "", 'Testing')
    Exit
;~  Local $sCapabilities = '{"capabilities": {"alwaysMatch": {"browserName": "firefox", "acceptInsecureCerts":true}}}'
    _WD_CapabilitiesStartup()
    _WD_CapabilitiesAdd('alwaysMatch', 'firefox')
    _WD_CapabilitiesAdd('browserName', 'firefox')
    _WD_CapabilitiesAdd('acceptInsecureCerts', True)
    If $bHeadless Then _WD_CapabilitiesAdd('args', '--headless')
    _WD_CapabilitiesDump(@ScriptLineNumber) ; dump current Capabilities setting to console - only for testing in this demo
    Local $sCapabilities = _WD_CapabilitiesGet()
    Return $sCapabilities
EndFunc   ;==>SetupGecko

 

While working with the file we tried to change the main core file to the following file to trace the error.

we changed namespace to a different variable so as to ascertain the error.

it might be a very specific issue with windows 7 64 Bit arch..

 

Local $oNameSpace_Install = $oShell.NameSpace($sInstallDir)
                                ; delete webdriver from disk before unpacking to avoid potential problems
                                FileDelete($sInstallDir & $sDriverEXE)
                                Local $bEXEWasFound = False
                                For $FileItem In $FilesInZip ; Check the files in the archive separately
                                    ; https://docs.microsoft.com/en-us/windows/win32/shell/folderitem
                                    If StringRight($FileItem.Name, 4) = ".exe" Or StringRight($FileItem.Path, 4) = ".exe" Then ; extract only EXE files
                                        $bEXEWasFound = True
                                        $oNameSpace_Install.CopyHere($FileItem, 20) ; 20 = (4) Do not display a progress dialog box. + (16) Respond with "Yes to All" for any dialog box that is displayed.
                                    EndIf
                                Next
                                Exit

Thanks Once Again.

 

Link to comment
Share on other sites

2 hours ago, n3wbie said:

it might be a very specific issue with windows 7 64 Bit arch..

I check it on my Windows10 64Bit.

With:

#AutoIt3Wrapper_AutoIt3Dir="z:\AutoItPortable\AutoIt_3_3_14_5"

And I hit the same problem.

Recently I was not able fire the same issue as I'm using AutoIt Beta version (for testing, not for production scripts) which has fixed this issue.
So as I forget about it I was not able to catch the same problem on my side.

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:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

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:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

  • Danp2 changed the title to WebDriver UDF (W3C compliant version) - 03/03/2022

I am using WebDriver for the first time as I need to convert all my AutoIt scripts from IE to Edge as I no longer have IE available with WIN 10 in my office.
Unfortunately all downloaded au3. files give syntax errors. (https://www.autoitscript.com/wiki/WebDriver)
Can you help me please?

 

"C:\AutoIt\AutoIt3\Include\wd_core.au3"(169,47) : warning: $SB_UTF8: possibly used before declaration.
Global $_WD_BFORMAT = $SB_UTF8 ; Binary format
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\AutoIt\AutoIt3\Include\wd_core.au3"(1713,59) : warning: $OBJ_STRING: possibly used before declaration.
    If (Not IsObj($vResult)) Or ObjName($vResult, $OBJ_STRING)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\AutoIt\AutoIt3\Include\wd_helper.au3"(549,45) : warning: $KEYWORD_NULL: possibly used before declaration.
    If (IsKeyword($vIdentifier) = $KEYWORD_NULL)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\AutoIt\AutoIt3\Include\wd_helper.au3"(1037,120) : warning: $ARRAYFILL_FORCE_SINGLEITEM: possibly used before declaration.
                        _ArrayAdd($aAllOptions, StringStripWS($vResult, $STR_STRIPTRAILING), 0, Default, @LF, $ARRAYFILL_FORCE_SINGLEITEM)
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\AutoIt\AutoIt3\Include\wd_helper.au3"(1037,120) : error: _ArrayAdd() called with wrong number of args.
                        _ArrayAdd($aAllOptions, StringStripWS($vResult, $STR_STRIPTRAILING), 0, Default, @LF, $ARRAYFILL_FORCE_SINGLEITEM)
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\AutoIt\AutoIt3\Include\wd_helper.au3"(1236,98) : warning: $STR_REGEXPARRAYMATCH: possibly used before declaration.
        Local $aLatestWDVersion = StringRegExp(BinaryToString($sResult), $sRegex, $STR_REGEXPARRAYMATCH)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\AutoIt\AutoIt3\Include\wd_helper.au3"(1583,65) : warning: $STDOUT_CHILD: possibly used before declaration.
        Local $iPID = Run($sCmd, $sInstallDir, @SW_HIDE, $STDOUT_CHILD)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\AutoIt\AutoIt3\Include\wd_helper.au3"(2462,31) : warning: $SB_UTF16LE: possibly used before declaration.
                $iConversion = $SB_UTF16LE
                ~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\AutoIt\AutoIt3\Include\wd_helper.au3"(2468,31) : warning: $SB_UTF16BE: possibly used before declaration.
                $iConversion = $SB_UTF16BE
                ~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\AutoIt\AutoIt3\Include\wd_helper.au3"(2477,28) : warning: $SB_ANSI: possibly used before declaration.
                $iConversion = $SB_ANSI
                ~~~~~~~~~~~~~~~~~~~~~~~^
"C:\AutoIt\AutoIt3\Include\wd_core.au3"(169,47) : error: $SB_UTF8: undeclared global variable.
Global $_WD_BFORMAT = $SB_UTF8 ; Binary format
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\AutoIt\AutoIt3\Include\wd_core.au3"(1713,59) : error: $OBJ_STRING: undeclared global variable.
    If (Not IsObj($vResult)) Or ObjName($vResult, $OBJ_STRING)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\AutoIt\AutoIt3\Include\wd_helper.au3"(549,45) : error: $KEYWORD_NULL: undeclared global variable.
    If (IsKeyword($vIdentifier) = $KEYWORD_NULL)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\AutoIt\AutoIt3\Include\wd_helper.au3"(1037,120) : error: $ARRAYFILL_FORCE_SINGLEITEM: undeclared global variable.
                        _ArrayAdd($aAllOptions, StringStripWS($vResult, $STR_STRIPTRAILING), 0, Default, @LF, $ARRAYFILL_FORCE_SINGLEITEM)
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\AutoIt\AutoIt3\Include\wd_helper.au3"(1236,98) : error: $STR_REGEXPARRAYMATCH: undeclared global variable.
        Local $aLatestWDVersion = StringRegExp(BinaryToString($sResult), $sRegex, $STR_REGEXPARRAYMATCH)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\AutoIt\AutoIt3\Include\wd_helper.au3"(1583,65) : error: $STDOUT_CHILD: undeclared global variable.
        Local $iPID = Run($sCmd, $sInstallDir, @SW_HIDE, $STDOUT_CHILD)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\AutoIt\AutoIt3\Include\wd_helper.au3"(2462,31) : error: $SB_UTF16LE: undeclared global variable.
                $iConversion = $SB_UTF16LE
                ~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\AutoIt\AutoIt3\Include\wd_helper.au3"(2468,31) : error: $SB_UTF16BE: undeclared global variable.
                $iConversion = $SB_UTF16BE
                ~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\AutoIt\AutoIt3\Include\wd_helper.au3"(2477,28) : error: $SB_ANSI: undeclared global variable.
                $iConversion = $SB_ANSI
                ~~~~~~~~~~~~~~~~~~~~~~~^
"C:\AutoIt\AutoIt3\Include\wd_helper.au3"(1323,76) : error: _ArrayExtract(): undefined function.
            Local $aBrowser = _ArrayExtract($_WD_SupportedBrowsers, $iIndex, $iIndex)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

Link to comment
Share on other sites

Which version of this UDF you are using ?

Please download and try to use this:

https://github.com/Danp2/au3WebDriver/archive/refs/heads/master.zip

or at least this:
https://github.com/Danp2/au3WebDriver/archive/refs/tags/0.7.0.zip

 

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:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

Hey there,

 

i tried to use WD with the new version of autoit (v3.3.16.0)

I get this error: 

"##########\wd_capabilities.au3" (284) : ==> Variable subscript badly formatted.:
$s_SpecificOptions_KeyName = $_WD_SupportedBrowsers[$iIndex][$_WD_BROWSER_OptionsKey]
$s_SpecificOptions_KeyName = $_WD_SupportedBrowsers[^ ERROR

 

I used this webdriver-download:

https://github.com/Danp2/au3WebDriver/archive/refs/heads/master.zip

 

and this:

https://github.com/Danp2/au3WebDriver/releases/tag/0.7.0

 

It makes no difference.

Does anyone have simliar problems?

Link to comment
Share on other sites

1 hour ago, mLipok said:

Which version of this UDF you are using ?

Please download and try to use this:

https://github.com/Danp2/au3WebDriver/archive/refs/heads/master.zip

or at least this:
https://github.com/Danp2/au3WebDriver/archive/refs/tags/0.7.0.zip

 

I just click all links in Wiki for the UDFs: https://github.com/Danp2/au3WebDriver/releases/tag/0.7.0

I will download from your links and will try again

Link to comment
Share on other sites

3 minutes ago, Danp2 said:

@NolleWedThat your editor version. When you run a script, the Autoit version should appear in the console output.

You should investigate running the portable version of Autoit so that you can have access to multiple versions simultaneously.

AutoIt3 Syntax Checker v3.3.10.2  Copyright (c) 2007-2013 Tylo & AutoIt Team

Link to comment
Share on other sites

49 minutes ago, Danp2 said:

@carparso Please show us your code containing _WD_CapabilitiesAdd. I suspect that you've passed an invalid browser name into this function.

@mLipok Need to add error checking after the _ArraySearch.

        Local $a= SetupEdge(False)
       _WD_Startup()
       $sSession = _WD_CreateSession($a)

 

 

    Func SetupEdge($bHeadless)
        _WD_Option('Driver', 'msedgedriver.exe')
        _WD_Option('Port', 9515)
        _WD_Option('DriverParams', '--verbose --log-path="' & @ScriptDir & '\msedge.log"')
    
    ;~     Local $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"excludeSwitches": [ "enable-automation"]}}}}'
        _WD_CapabilitiesStartup()
        _WD_CapabilitiesAdd('alwaysMatch', 'edge')
        _WD_CapabilitiesAdd('excludeSwitches', 'enable-automation')
        _WD_CapabilitiesAdd('acceptInsecureCerts', 'true')
    
        If $bHeadless Then _WD_CapabilitiesAdd('args', '--headless')
        _WD_CapabilitiesDump(@ScriptLineNumber) ; dump current Capabilities setting to console - only for testing in this demo
        Local $sDesiredCapabilities = _WD_CapabilitiesGet()
        Return $sDesiredCapabilities
    EndFunc   ;==>SetupEdge

 

 

 

 

I have an other pc with the autoit-version from 2018. I copied the include folder from this pc to my "new pc". Now it works. The webDriver-files are the same. I think it is the new version from Autoit which cuases this problem.

No more help needed. I just not use the new autoit-version and it works 🙂

BTW: thx for the great work and support 🙂    

 

 

 

 

Link to comment
Share on other sites

  • Danp2 changed the title to WebDriver UDF (W3C compliant version) - 07/29/2022
  • Jos locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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