Jump to content

Recommended Posts

Posted

Did you take a look on _WD_Alert() ?

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

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

@BuiTuanAnh

  1. This is the same question you asked here last year. In the future, let us know that this is a continuation of a prior question so that we can review the prior interaction.
  2. That dialog may not be controllable using webdriver.
  3. Telling us something "doesn't work" isn't very useful when you don't include additional details (for example: Autoit code and resulting webdriver logs)
  4. I believe that you can specify extensions to load when you launch the webdriver.  Have you investigated that option?
Posted (edited)

@Danp2
I don't know how to interpret the error, but in my case the extension metamask popup I have no way to get its element

Edited by Jos
Removed Translated Quoted text... Please stop doing that!
Posted (edited)

I have such error:

  Quote


{"value":{"error":"stale element reference","message":"The element reference of <div id=\"SOMEIDNAME\"> is stale; either the element is no longer attached to the DOM, it is not in the current frame context, or the document has been refreshed","stacktrace":"WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:183:5\nStaleElementReferenceError@chrome://remote/content/shared/webdriver/Errors.jsm:464:5\nelement.resolveElement@chrome://remote/content/marionette/element.js:681:11\nevaluate.fromJSON@chrome://remote/content/marionette/evaluate.js:254:26\nevaluate.fromJSON/<@chrome://remote/content/marionette/evaluate.js:245:38\nevaluate.fromJSON@chrome://remote/content/marionette/evaluate.js:245:20\nevaluate.fromJSON@chrome://remote/content/marionette/evaluate.js:262:29\nreceiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.jsm:79:29\n"}}

Expand  

I have stoped this script on this error.
Then I checked that this particular ID exist in DOM.
Yes it exist.

So: What this error mean ?

Edited by mLipok

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

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

 

Hello,

I'm new to using Xref, I have been able to get Input fields and navigation links to work using the webdriver and Xref.

When it is not an input filed how do you select it and then click it using Xref ?

Below is the HTML snippet from the page ( Please note it is inside of an Iframe)

I have tried various version of the below and am not having any luck

_WD_FindElement($_MY__WD_SESSION, $_WD_LOCATOR_ByXPath, "//@id='win0div$ICField19'")

_WD_FindElement($_MY__WD_SESSION, $_WD_LOCATOR_ByXPath, "//@id='$ICField19'")

_WD_FindElement($_MY__WD_SESSION, $_WD_LOCATOR_ByXPath, "//@id=['$ICField19]'")

Any ideas what i should try

 

<tr>
<td height='30' colspan='2'></td>
<td  valign='top' align='left'>
<DIV    id='win0div$ICField19'><span id='$ICField19$span'  class='PSHYPERLINK' ><a name='$ICField19' id='$ICField19'  ptlinktgt='pt_replace' tabindex='23' onclick='javascript:cancelBubble(event);' href="javascript:submitAction_win0(document.win0,'$ICField19');"  class='PSHYPERLINK' >View Details</a></span></DIV></td>
</tr>

 

Posted
; Try this
 _WD_FindElement($_MY__WD_SESSION, $_WD_LOCATOR_ByXPath, "//*[@id='$ICField19']")
 
 ; Alternatively
 _WD_GetElementById($_MY__WD_SESSION, "$ICField19")

 

  On 5/26/2022 at 5:44 PM, HighlanderSword said:

Please note it is inside of an Iframe

Expand  

You need to switch to the correct frame using _WD_FrameEnter or _WD_Window before the above will work.

Posted

@HighlanderSword

does this ID

<span id='$ICField19$span'

is changing ? or is it permament ?

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

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

btw.
You can also take a look on

href="javascript:submitAction_win0(document.win0,'$ICField19');"


and do this :
 

_WD_ExecuteScript($sSession, "submitAction_win0(document.win0,'$ICField19');")

 

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

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

 

Hello

 

Tried the _wd_executescript, and below is the error from the log

 

1653589293757   webdriver::server       DEBUG   -> POST /session/cc5cf4aa-dfab-4846-aff1-fba0eaccb50e/execute/sync {"script":"submitAction_win0(document.win0,'$ICField19');", "args":[]}
1653589293760   webdriver::server       DEBUG   <- 500 Internal Server Error {"value":{"error":"javascript error","message":"ReferenceError: submitAction_win0 is not defined"

Posted

@HighlanderSword did you follow @Danp2 advice:

  On 5/26/2022 at 5:55 PM, Danp2 said:

You need to switch to the correct frame using _WD_FrameEnter or _WD_Window before the above will work.

Expand  

??

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

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)

Also: Did you try to paste and run:

submitAction_win0(document.win0,'$ICField19');

Directly in Browser console ?

Edited by mLipok

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

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

I think you should watch some videos to get some new knowledge:

 

 

 

 

 

 

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

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

Could somebody provide example for using: _WD_CheckContext() ?

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

  Reveal hidden contents

Signature last update: 2023-04-24

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

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