Jump to content

Recommended Posts

Posted

Ok it may be 5 sec.

Explanation:
I need a publicly accessible web portal that takes long enough to load to show some "problems" of this UDF, and of course, a way to solve it.
 

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

Posted

for _WD_NewTab() function there is parameter:
$sFeatures           - [optional] Comma-separated list of requested features of the new tab

Please provide link to some description or to WebDriver documentation in this regards.

 

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

Posted (edited)
4 minutes ago, mLipok said:

for _WD_NewTab() function there is parameter:
$sFeatures           - [optional] Comma-separated list of requested features of the new tab

Please provide link to some description or to WebDriver documentation in this regards.

 

https://developer.mozilla.org/en-US/docs/Web/API/Window/open#window_features

Edit: It's often helpful to check out the internal code... in this case it's nice because it is passed to _WD_ExecuteScript using window.open in JavaScript

Edited by seadoggie01

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

Spoiler

My Humble Contributions:
Personal Function Documentation - A personal HelpFile for your functions
Acro.au3 UDF - Automating Acrobat Pro
ToDo Finder - Find #ToDo: lines in your scripts
UI-SimpleWrappers UDF - Use UI Automation more Simply-er
KeePass UDF - Automate KeePass, a password manager
InputBoxes - Simple Input boxes for various variable types

Posted (edited)
5 minutes ago, seadoggie01 said:

Thanks,
using the given URL    I just made PR
https://github.com/Danp2/WebDriver/pull/84

 

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:

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

Posted (edited)
On 8/11/2021 at 9:44 PM, Danp2 said:

@mLipokCould you accomplish this with your own HTML file?

WIll try with:
 

<script type="text/javascript">
 
setTimeout(function()
{
    // Delayed code in here
    alert('You waited 10 seconds to see me'); // Waits 5 seconds, then alerts this
}, 10000); // 10000 = 10 seconds

</script>

 

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:

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

  • 2 weeks later...
Posted

Hi there,

I am trying to click an element, but for some reason the standard way does no longer "make" the click. It used to work up until now. (Doubleclick does not work either) When trying to click the button with a javascript command, it works. Could this problem be due to changes in the website's underlying framework? Is there a common solution to such a problem? The website is "society6".

//This finds the element, but the Action does not execute
_WD_WaitElement($sSession, $_WD_LOCATOR_ByXPath, "//button[@class='uploadBtn_banner_2b9z8']")
$add = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//button[@class='uploadBtn_banner_2b9z8']")
_WD_ElementAction($sSession, $add, 'click')

//This works
_WD_ExecuteScript($sSession, "document.getElementsByClassName('uploadBtn_banner_2b9z8')[0].click()")

Thanks for your help.

 

Posted
1 hour ago, _leo_ said:

Could this problem be due to changes in the website's underlying framework?

Yes... It's possible that the xpath has changed, but can't say for sure since you didn't include the resulting Scite output from when your code ran. Was the element found using that xpath?

P.S. This discussion really belongs in the support thread in the GH&S section (see link below in m sig)

Posted
Quote

Yes... It's possible that the xpath has changed, but can't say for sure since you didn't include the resulting Scite output from when your code ran. Was the element found using that xpath?

@Danp2 Yes, the element is found with xpath, and ElementAction does try to click it. (As commented in the code of my previous post) The output looks exactly the same as a successfull click would look like. It is just very strange to me, that the whole automation stopped working from one day to another. I will try on my other computer too.

 

Posted

@Danp2 Thanks for checking. Yes an account is needed to access that part of the website. Do you think there is any point in trying to automate this page with this udf?

Posted

Hello, I would like to know if there is any way to update only the driver to handle the browser? depending on the version that is installed on the pc?

Sorry if you solved this already but I didn't find anything on this.

Posted (edited)

Hi @Danp2,
I'm trying to access website using emulator mode similar to emulator mode in F12 Develope. However, for some websites, I can't do click or touch. I need to solve this problem, hope to get your help. Here is my code:
 

_WD_Option('Driver', @ScriptDir & '\source\chromedriver.exe')
_WD_Option('Port', 9515)
_WD_Option('DriverParams', '--log-path="' & @ScriptDir & '\chrome.log"')
$sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true, "excludeSwitches": [ "enable-automation"], "useAutomationExtension": false, "mobileEmulation": { "deviceMetrics": { "width": 640, "height": 360, "pixelRatio": 3.0, "click": true}, "userAgent": "Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 5 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19" }}}}}'
_WD_Startup()
Sleep(2000)
$sSession = _WD_CreateSession($sDesiredCapabilities)
_WD_Navigate($sSession, "https://tdtc88.com/")

 

Edited by nguyenthaiytcc
Posted (edited)

I'm trying to automate: https://www.imsig.pl/
In headless mode all is done well.
But when I try to view what is going on I mean I want to use non headless mode, then I get this problem

Quote

_WD_WaitElement ==> Success
__WD_Post: URL=HTTP://127.0.0.1:9515/session/d8fa72e273d772b3ed19606e53f4acdc/element; $sData={"using":"xpath","value":".//input[@name=\"email\"]"}
__WD_Post: StatusCode=200; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"7a0b511c-d69f-478b-8218-74f76693465e"}}...
_WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"7a0b511c-d69f-478b-8218-74f76693465e"}}
__WD_Post: URL=HTTP://127.0.0.1:9515/session/d8fa72e273d772b3ed19606e53f4acdc/element/7a0b511c-d69f-478b-8218-74f76693465e/clear; $sData={"id":"7a0b511c-d69f-478b-8218-74f76693465e"}
__WD_Post: StatusCode=400; ResponseText={"value":{"error":"element not interactable","message":"element not interactable\n  (Session info: c...
__WD_Post ==> Element interaction issue: {"value":{"error":"element not interactable","message":"element not interactable\n  (Session info: chrome=92.0.4515.159)","stacktrace":"Backtrace:\n\tOrdinal0 [0x00662DB3+2502067]\n\tOrdinal0 [0x005FC5B1+2082225]\n\tOrdinal0 [0x00502360+1057632]\n\tOrdinal0 [0x0052528B+1200779]\n\tOrdinal0 [0x00545D23+1334563]\n\tOrdinal0 [0x00523446+1193030]\n\tOrdinal0 [0x00545E0A+1334794]\n\tOrdinal0 [0x00554B7B+1395579]\n\tOrdinal0 [0x00545BEB+1334251]\n\tOrdinal0 [0x00522174+1188212]\n\tOrdinal0 [0x00523009+1191945]\n\tGetHandleVerifier [0x007DEC5C+1511084]\n\tGetHandleVerifier [0x00888522+2205554]\n\tGetHandleVerifier [0x006E3393+480739]\n\tGetHandleVerifier [0x006E2579+477129]\n\tOrdinal0 [0x00601E5D+2104925]\n\tOrdinal0 [0x006063F8+2122744]\n\tOrdinal0 [0x00606537+2123063]\n\tOrdinal0 [0x0060EE53+2158163]\n\tBaseThreadInitThunk [0x769EFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x772E7A7E+286]\n\tRtlGetAppContainerNamedObjectPath [0x772E7A4E+238]\n"}}
_WD_ElementAction: {"value":{"error":"element not interactable","message":"element not interactable\n  (Session info: c...
_WD_ElementAction ==> Element interaction issue: {"value":{"error":"element not interactable","message":"element not interactable\n  (Session info: chrome=92.0.4515.159)","stacktrace":"Backtrace:\n\tOrdinal0 [0x00662DB3+2502067]\n\tOrdinal0 [0x005FC5B1+2082225]\n\tOrdinal0 [0x00502360+1057632]\n\tOrdinal0 [0x0052528B+1200779]\n\tOrdinal0 [0x00545D23+1334563]\n\tOrdinal0 [0x00523446+1193030]\n\tOrdinal0 [0x00545E0A+1334794]\n\tOrdinal0 [0x00554B7B+1395579]\n\tOrdinal0 [0x00545BEB+1334251]\n\tOrdinal0 [0x00522174+1188212]\n\tOrdinal0 [0x00523009+1191945]\n\tGetHandleVerifier [0x007DEC5C+1511084]\n\tGetHandleVerifier [0x00888522+2205554]\n\tGetHandleVerifier [0x006E3393+480739]\n\tGetHandleVerifier [0x006E2579+477129]\n\tOrdinal0 [0x00601E5D+2104925]\n\tOrdinal0 [0x006063F8+2122744]\n\tOrdinal0 [0x00606537+2123063]\n\tOrdinal0 [0x0060EE53+2158163]\n\tBaseThreadInitThunk [0x769EFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x772E7A7E+286]\n\tRtlGetAppContainerNamedObjectPath [0x772E7A4E+238]\n"}}
 

My capabilities settings are:

{"capabilities":
    {
        "alwaysMatch": 
        {
            "goog:chromeOptions":
            {
                "w3c": true
                ,"args":
                    [
                        "--headless"
                        ,"start-maximized"
                        ,"disable-infobars"
                        ,"user-data-dir=C:\\Users\\Szef\\AppData\\Local\\Google\\Chrome\\User Data\\Default"
                    ]
                ,"prefs":
                    {
                    }
            }
        }   
    }
}

This problem is all the more weird that it occurs on my computer, but on @dPilar computer everything works fine in both modes.

Any sugesstions how to solve this issue on my computer ?

 

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:

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

Posted (edited)

In the meanwhile I did some checking on my side

This particular error was related to the fact that this elemet stay hidden....
So I add Visible+Enabled option:

_WD_WaitElement($_IMSIG__WD_SESSION, $_WD_LOCATOR_ByXPath, './/input[@name="email"]', Default, Default, BitOR($_WD_OPTION_Visible, $_WD_OPTION_Enabled))

and this part of this issue was solved. 
But there was still a problem with the difference between the two modes, so I did further tests.

It turns out that the main problem is clicking:

Local $sElement = _WD_WaitElement($_IMSIG__WD_SESSION, $_WD_LOCATOR_ByXPath, '//div[@class="header-logo"]//a[@href="/konto"]', Default, Default, BitOR($_WD_OPTION_Visible, $_WD_OPTION_Enabled))
    If Not @error Then
        Local $v_Result = _WD_ElementAction($_IMSIG__WD_SESSION, $sElement, 'click')
    EndIf

image.png.04a552b0eced772d95cb799fd5b10cd3.png

 

Quote

Headless = False

__WD_Post: URL=HTTP://127.0.0.1:9515/session/6d69c5e66521d64dd113400c90ab7e81/element; $sData={"using":"xpath","value":"//div[@class=\"header-logo\"]//a[@href=\"/konto\"]"}
__WD_Post: StatusCode=200; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"9d0759e3-9d3c-4aed-8cef-4c4827a2b5cb"}}...
_WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"9d0759e3-9d3c-4aed-8cef-4c4827a2b5cb"}}
__WD_Get: URL=HTTP://127.0.0.1:9515/session/6d69c5e66521d64dd113400c90ab7e81/element/9d0759e3-9d3c-4aed-8cef-4c4827a2b5cb/displayed
__WD_Get: StatusCode=200; $iResult = 0; $sResponseText={"value":true}...
_WD_ElementAction: {"value":true}...
__WD_Get: URL=HTTP://127.0.0.1:9515/session/6d69c5e66521d64dd113400c90ab7e81/element/9d0759e3-9d3c-4aed-8cef-4c4827a2b5cb/enabled
__WD_Get: StatusCode=200; $iResult = 0; $sResponseText={"value":true}...
_WD_ElementAction: {"value":true}...
_WD_WaitElement ==> Success
__WD_Post: URL=HTTP://127.0.0.1:9515/session/6d69c5e66521d64dd113400c90ab7e81/element/9d0759e3-9d3c-4aed-8cef-4c4827a2b5cb/click; $sData={"id":"9d0759e3-9d3c-4aed-8cef-4c4827a2b5cb"}
__WD_Post: StatusCode=200; ResponseText={"value":null}...
_WD_ElementAction: {"value":null}...
__WD_Post: URL=HTTP://127.0.0.1:9515/session/6d69c5e66521d64dd113400c90ab7e81/execute/sync; $sData={"script":"return document.readyState", "args":[]}
__WD_Post: StatusCode=200; ResponseText={"value":"complete"}...
_WD_ExecuteScript: {"value":"complete"}...

Headless = True

__WD_Post: URL=HTTP://127.0.0.1:9515/session/ad38d431b6df5084f1eb4aa7bbc2ce48/element; $sData={"using":"xpath","value":"//div[@class=\"header-logo\"]//a[@href=\"/konto\"]"}
__WD_Post: StatusCode=200; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"70e87656-84cf-424f-b6a0-eb994354a839"}}...
_WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"70e87656-84cf-424f-b6a0-eb994354a839"}}
__WD_Get: URL=HTTP://127.0.0.1:9515/session/ad38d431b6df5084f1eb4aa7bbc2ce48/element/70e87656-84cf-424f-b6a0-eb994354a839/displayed
__WD_Get: StatusCode=200; $iResult = 0; $sResponseText={"value":true}...
_WD_ElementAction: {"value":true}...
__WD_Get: URL=HTTP://127.0.0.1:9515/session/ad38d431b6df5084f1eb4aa7bbc2ce48/element/70e87656-84cf-424f-b6a0-eb994354a839/enabled
__WD_Get: StatusCode=200; $iResult = 0; $sResponseText={"value":true}...
_WD_ElementAction: {"value":true}...
_WD_WaitElement ==> Success
__WD_Post: URL=HTTP://127.0.0.1:9515/session/ad38d431b6df5084f1eb4aa7bbc2ce48/element/70e87656-84cf-424f-b6a0-eb994354a839/click; $sData={"id":"70e87656-84cf-424f-b6a0-eb994354a839"}
__WD_Post: StatusCode=200; ResponseText={"value":null}...
_WD_ElementAction: {"value":null}...
__WD_Post: URL=HTTP://127.0.0.1:9515/session/ad38d431b6df5084f1eb4aa7bbc2ce48/execute/sync; $sData={"script":"return document.readyState", "args":[]}
__WD_Post: StatusCode=200; ResponseText={"value":"complete"}...
_WD_ExecuteScript: {"value":"complete"}...
 

in both cases (Headless True/False) in the log results looks ok,
but when Headless is OFF (False) then I do not see that this click is done, and because of this the further //input[@name=\"email\"] was keept hidden.

So the question is: Why in case when headless =  False, the Click is not performed well ?

 

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:

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

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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