Jump to content

WebDriver UDF - Help & Support (III)


Danp2
 Share

Recommended Posts

@seadoggie01I agree that this shouldn't be an issue regarding the forum rules. If it is, then I'm sure one of the mods will make an appearance. 😸

@tac7You may want to try adjusting pageLoadStrategy to see if this helps in your situation. If you search the forum, you should find some examples of its proper usage.

Link to comment
Share on other sites

 

Have a nice day.
I am trying to ask if you have ever used multiprocess in webdriver?. It seems that this is a problem that quite a lot of people are interested in 😄

 
 
 
 
 
Have a nice day. I am trying to ask if you have ever used multiprocess in webdriver?. It seems that this is a problem that quite a lot of people are interested in
Link to comment
Share on other sites

5 minutes ago, Danp2 said:

@minhuyYou should take some time to better define your question because "multiprocess" can mean different things to different people.

  • Exactly what are you trying to accomplish?
  • What have you tried thus far?
  • Which browser?
  • Etc

The same, I do a search in google with different number of keywords. If I combine multi-process, it will reduce my execution time. I used coproc to create different processes. Actually, I saw a lot of people talking about this so I thought it was a matter of discussion

Link to comment
Share on other sites

@Danp2, based on his username, im pretty sure that he's in same country as mine where most people make bots which against forum rules. And based on his recent posted code, i doubt that he has the skill to automating something legal, unless he tells us. Hence i advised you not to answer this guy until he answer your questions.

Quote
  • Exactly what are you trying to accomplish?


@minhuy, this forum is not the place for you to ask for help with bots.

Edited by sylremo
Link to comment
Share on other sites

5 minutes ago, sylremo said:

@Danp2, based on his username, im pretty sure that he's in same country as mine where most people make bots which against forum rules. And based on his recent posted code, i doubt that he has the skill to automating something legal, unless he tells us. Hence i advised you not to answer this guy until he answer your questions.

@minhuy, this forum is not the place for you to ask for help with bots.

Thank you. Maybe I haven't read the forum rules yet. I will learn it somewhere else. Thank you for comment

Link to comment
Share on other sites

@Danp2, specifically in this topic, the kind of bots that i mentioned is against Automation of software/sites contrary to their EULA.

So talking about bots doing tasks like accessing and collecting social accounts data should be illegal right?

Link to comment
Share on other sites

@Danp2, he was asking for proxy setup and now multi processes, i concluded that he might be up to that kind of bot.
For me, like i've mentioned before, i'm automating my web app, which is of course has nothing to do with EULAs. And more specifically my web app is intended to block traffics from specific locations so i have to setup proxy for this test case.

Link to comment
Share on other sites

24 minutes ago, tac7 said:

I make an external EXE who check and validate the popup windows. It's work fine.

Yes, this was the only way to solve your problem (I mean the only one which I already know)

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 Code * for 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 API * ErrorLog.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 TaskScheduler * IE 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 stuff * OnHungApp handler * Avoid "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

How to get/check current URL ?

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 Code * for 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 API * ErrorLog.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 TaskScheduler * IE 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 stuff * OnHungApp handler * Avoid "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

15 minutes ago, CYCho said:

_WD_Action("URL")

Thanks.
Fixed: 

_WD_Action($sSession, "URL")

 

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 Code * for 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 API * ErrorLog.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 TaskScheduler * IE 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 stuff * OnHungApp handler * Avoid "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

Hi,

(Before I want to Thank You for this work, it's very help full. thank a lot "Danp2" !!!!)


I see in WebDriver : to replace _IEPropertyGet we need to call _WD_FindElement + _WD_ElementAction($sSession, $sElement, 'property', 'nodeName') .

Before with IE.au3 I used:

_IEPropertyGet($oIE, "locationurl") or _IEPropertyGet($oIE, "text") or _IEPropertyGet($oIE, "statustext")

Is that possible to get this sames informations with WebDriver? and so change its ??

Edited by tac7
Link to comment
Share on other sites

Hello Danp2 and everybody,

I just started using WebDriver UDF because IE11 is not working for my purpose.

I had many Sonoffs to "tasmotize" via OTA and the DIY web page on the MiniR2 does not respond to IE UDF or even manually via IE11 user interface.

I solved with geckodriver but I ended up with a folder of hundreds of MBs that contains the Portable Apps I used, while the same scripts with IE UDF was just a few MBs. Now I'm doing some cleanup as I'm trying to figure out what is the "smallest" version of FF or Chrome that could be used with the oldest version of chromedriver and geckodriver.

The working setup I found is with the latest version of geckodriver.exe and FF 69 or FF 60. I tested also FF 68 ESR but it didn't work (maybe ESR versions are different ?).

I'm testing now geckodriver 0.14 with FF 51 and FF 60 but it's not responding correctly. I would love to go back in time to the first working setup with the smallest browser possible. The basic commands to achieve are to simply write input fields and a couple of clicks. I saved the web page from the Sonoff device and you can find it attached to this comment.

$oTagSETUP = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath,"//div[@id='main-setting']")
 _WD_ElementAction($sSession, $oTagSETUP, 'click')
 $oTagSSID = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath,"//input[@id='input-net-ssid']")
 _WD_ElementAction($sSession, $oTagSSID, 'value', "SSID")
 $oTagPSWD = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath,"//input[@id='input-net-password']")
 _WD_ElementAction($sSession, $oTagPSWD, 'value', "password")
 $oTagSAVE = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@id='setup-save']")
_WD_ElementAction($sSession, $oTagSAVE, 'click')

I found on AutoIt german forum a post about setting different versions of WebDrivers depending on the browser version and I started working in this direction but before digging into a work that would take hours if not days, I'm wondering if there is a summary table somewhere with the minimal requirements of every driver version to be able to find the smallest web browser to do simple things like those that I need. In a "portable" way.

Thanks for this wonderful tool and have a nice day,

V.

Sonoff DIY Mode.htm

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