Jump to content

WebDriver UDF - Help & Support (III)


Danp2
 Share

Recommended Posts

2 minutes ago, Danp2 said:

Ok. Maybe @mLipok can take a look at this since he made the change.

Possibly I Dont have Certain Dependencies as i m using Windows 7 (older version).

May be there isnt an update wherein Shell can directly look into Zip files and hence generating error

I tried Manually replacing variable for $FileItem to chromedriver.exe still it doesnt extract chromedriver.

And Hence this error Would be limited to me.

if possible please have a workaround for the same.

Link to comment
Share on other sites

Hi everybody!
I need to manipulate Firefox Portable with the old version but I can't run my script. I was familiar with Chrome so I moved to another version quite difficult. You can help me create a correct code. This is the script that I tested and failed. thank you

#include "driver\wd_core.au3"
#include "driver\wd_helper.au3"
_WD_Option('Driver', 'geckodriver.exe') _WD_Option('DriverParams', '--log trace') _WD_Option('Port', 4444)
$ sDesnticCapabilities = '{"mong muốnCapabilities": {"javascriptEnabled": true, "nativeEvents": true, "acceptInsecureCerts": true, "moz: firefoxOptions": {"binary": "C:\\Users\\NeyPro\\Desktop\\Test\\FirefoxPortable"," args ": [" - profile "," C:\\Users\\NeyPro\\Desktop\\Test\\FirefoxPortable\\"]}}} '
$sSession=_WD_CreateSession($sDesiredCapabilities)
_WD_Navigate($sSession,'https://www.google.com')
_WD_LoadWait($sSession)
Link to comment
Share on other sites

2 hours ago, n3wbie said:

\wd_helper.au3" (1408) : ==> The requested action with this object has failed.:
$FilesInZip = $oNameSpace.items
$FilesInZip = $oNameSpace^ ERROR

 

Still Getting Same error Downloaded Updated Version From Git Repo

 

I will take a kook ASAP

 

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

7 minutes ago, Danp2 said:

@ n3wbieFWIW, tôi đã thử nghiệm điều này trên máy ảo Win7 và tôi không gặp bất kỳ lỗi nào. Bạn đã đề cập đến "Windows 7 (phiên bản cũ hơn)". Ý bạn là gì ở phiên bản cũ hơn? Bạn chưa cho chúng tôi xem bất kỳ mã nào. Cuộc gọi của bạn tới _WD_UpdateDriver trông như thế nào?

 

Can you help my problem??

 

2 hours ago, neypro said:

Chào mọi người!
Tôi cần thao tác với Firefox Portable với phiên bản cũ nhưng tôi không thể chạy tập lệnh của mình. Tôi đã quen với Chrome nên chuyển sang phiên bản khác khá khó khăn. Bạn có thể giúp tôi tạo một mã chính xác. Đây là tập lệnh mà tôi đã thử nghiệm và không thành công. cảm ơn

#include "driver \ wd_core.au3"
#include "driver \ wd_helper.au3"
_WD_Option ('Driver', 'geckodriver.exe') _WD_Option ('DriverParams', '--log trace') _WD_Option ('Cổng', 4444)
$ sDesnticCapabilities = '{"mong muốnCapabilities": {"javascriptEnabled": true, "nativeEvents": true, "acceptInsecureCerts": true, "moz: firefoxOptions": {"binary": "C: \\ Users \\ NeyPro \ \ Desktop \\ Test \\ FirefoxPortable "," args ": [" - profile "," 😄 \\ Users \\ NeyPro \\ Desktop \\ Test \\ FirefoxPortable \\ "]}}} '
$ sSession = _WD_CreateSession ($ sDesosystemCapabilities)
_WD_Navigate ($ sSession, ' https://www.google.com ')
_WD_LoadWait ($ sSession)

 

Link to comment
Share on other sites

4 minutes ago, Danp2 said:

Trường hợp nào này đến từ đâu? AFAIK, đây cần phải là "khả năng".

Có các ví dụ trên wiki để chỉ định vị trí thực thi và sử dụng một hồ sơ hiện có.

This is my new code. But it still cannot operate. I want to use it with Firefox Portable. Can you help me fix it?

    _WD_Option('Driver', 'geckodriver.exe')
    _WD_Option('DriverParams', '--log trace')
    _WD_Option('Port', 4444)
 Local  $s_FireFox_exe  =  StringReplace ( 'C:\Users\iTX Store\Desktop\Test\ff1\App\Firefox64\firefox.exe' , '\' ,  '\\' )
    $sDesiredCapabilities = '{"capabilities":{"alwaysMatch":{"moz:firefoxOptions":{"binary":"' & $s_FireFox_exe & '", "args": "-profile","log": {"level": "trace"}}}}}'
                    $sSession=_WD_CreateSession($sDesiredCapabilities)
                    _WD_Navigate($sSession,'https://www.google.com')
                    _WD_LoadWait($sSession)
                    MsgBox(0, "", 0)

Link to comment
Share on other sites

3 minutes ago, Danp2 said:

@neyproPlease do not post a translated quote! Only quote when needed and in English. Also, please allow at least 24 hours before you "bump" your post.

Sorry for the translation application on my computer confused. Sorry because my talk is not right. :(

Link to comment
Share on other sites

4 minutes ago, Danp2 said:

You need to call _WD_Startup() prior to _WD_CreateSession(). If that doesn't fix it, then please post the complete results from the Scite output panel.

This is the fault I have received :(

WDStartup: OS:    WIN_10 WIN32_NT 22000 
_WDStartup: AutoIt:    3.3.14.5
_WDStartup: WD.au3:    0.1.0.19
_WDStartup: Driver:    geckodriver.exe
_WDStartup: Params:    --log trace
_WDStartup: Port:    4444
__WD_Post: URL=HTTP://127.0.0.1:4444/session; $sData={"capabilities":{"alwaysMatch":{"moz:firefoxOptions":{"binary":"C:\\Users\\iTX Store\\Desktop\\Test\\ff1\\App\\Firefox64\\firefox.exe", "args": "-profile","log": {"level": "trace"}}}}}
__WD_Post: StatusCode=500; ResponseText={"value":{"error":"unknown error","message":"Invalid Content-Type","stacktrace":""}}
_WD_CreateSession: {"value":{"error":"unknown error","message":"Invalid Content-Type","stacktrace":""}}
_WD_CreateSession ==> Webdriver Exception: Invalid Content-Type
__WD_Post: URL=HTTP://127.0.0.1:4444/session//url; $sData={"url":"https://www.google.com"}
__WD_Post: StatusCode=405; ResponseText=HTTP method not allowed
_WD_Navigate: HTTP method not allowed
__WD_Post: URL=HTTP://127.0.0.1:4444/session//execute/sync; $sData={"script":"return document.readyState", "args":[]}
__WD_Post: StatusCode=405; ResponseText=HTTP method not allowed
_WD_ExecuteScript: HTTP method not allowed
_WD_LoadWait ==> General Error

Link to comment
Share on other sites

15 minutes ago, neypro said:

_WDStartup: WD.au3:    0.1.0.19

That's almost three years old, so way out of date. Please update to the latest release if you want further support.

Quote

"args": "-profile"

Also, you aren't supplying the location of the profile.

Edited by Danp2
Added profile comment
Link to comment
Share on other sites

15 minutes ago, Danp2 said:

That's almost three years old, so way out of date. Please update to the latest release if you want further support.

Thank you very much!

I used the wrong version silly. My script has runs however do I can use the Fire Portable profile if I specify.I have not found user information in your Portable folder :(

Link to comment
Share on other sites

Yes. I am doing that manually finding a profile. I thank you for helping me very much

8 minutes ago, Danp2 said:

@neyproWe have no way of knowing the location of your profile directory. However, you can look it up yourself by launching Firefox and then navigating to "about:support". You should see an entry for Profile Folder that shows you the current profile directory.

 

Link to comment
Share on other sites

8 hours ago, mLipok said:

I will take a kook ASAP

 

fix is on the way

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

12 hours ago, Danp2 said:

@n3wbieFWIW, I tested this on a Win7 VM and I didn't encounter any errors. You mentioned "Windows 7 (older version)". What did you mean by older version? You haven't shown us any code. What does your call to _WD_UpdateDriver look like?

 

$dir = @ScriptDir
$basedir = StringLeft($dir, StringInStr($dir, "\", 0, -1) - 1)

_WD_UpdateDriver('Chrome', $basedir & "/Dependencies/")

 

Older Version of Win7 Means I havnt Updated Most of The Updates Made Available Through Microsoft

For All Zip Files I have to Compulsarily use Winrar or Winzip or 7Zip.

Like Windows 8 or Higher Version Just Double Clicking makes it Enable to open zip files in Windows Explorer itself

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...