Jump to content

WebDriver UDF - Help & Support


Recommended Posts

21 hours ago, Danp2 said:

The UDF is designed to run with webdrivers supporting the current W3C standard.

Please explain why you insist on testing with such out of date versions of Chrome / Chromedriver?

I want to try to automate some user activity in the application called "Oracle Siebel CRM". In short, the ancient shit for enterprise, witch works only with IE and Chrome 59.

Link to post
Share on other sites
  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

This is the "General Help and Support" thread for the WebDriver UDF. The UDF itself can be downloaded here. So if you have any questions, suggestions or errors please post here.

use the _WD_ElementAction function like this: $sValue = _WD_ElementAction($sSession, $sElement, 'attribute', 'src') p.s. ... and remove @src from the xPath: "//img[@alt='NiceGirl']"

Time ago I wrote a function to extract data from  the source HTML code of tables. https://www.autoitscript.com/forum/topic/167679-read-data-from-html-tables-from-raw-html-source/ Seems that that fun

Posted Images

As I told, I am working on getting the details of the elements on a page. Can any one please suggest where can I search for the options to use with 'attribute', 'property' and  'css' commands on _WD_ElementAction. I have read the details on https://w3c.github.io/webdriver/webdriver-spec.html#element-state, but couldn't find the options to use.

Can anyone please help?

Link to post
Share on other sites

Need help, my automatic test stays in iframe

_WDStartup: OS: WIN_10 WIN32_NT 14393 
_WDStartup: AutoIt: 3.3.14.2
_WDStartup: WD.au3: 0.1.0.10
_WDStartup: Driver: chromedriver.exe
_WDStartup: Params: --log-path="G:\WebDriver\chrome.log"
_WDStartup: Port:   9515
__WD_Post: URL=HTTP://127.0.0.1:9515/session; $sData={"capabilities": {"alwaysMatch": {"chromeOptions": {"w3c": true }}}}
__WD_Post: StatusCode=200; ResponseText={"value":{"capabilities":{"acceptInsecureCerts":false,"acceptSslCerts":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chrome":{"chromedriverVersion":"2.40.565498 (ea082db3280dd6843ebfb08a625e3eb905c4f5ab)","userDataDir":"C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\scoped_dir4328_23411"},"cssSelectorsEnabled":true,"databaseEnabled":false,"handlesAlerts":true,"hasTouchScreen":false,"javascriptEnabled":true,"locationContextEnabled":true,"mobileEmulationEnabled":false,"nativeEvents":true,"networkConnectionEnabled":false,"pageLoadStrategy":"normal","platform":"Windows NT","rotatable":false,"setWindowRect":true,"takesHeapSnapshot":true,"takesScreenshot":true,"unexpectedAlertBehaviour":"","version":"67.0.3396.99","webStorageEnabled":true},"sessionId":"ab33649d86852438db5447ae22510b76"}}
_WD_CreateSession: {"value":{"capabilities":{"acceptInsecureCerts":false,"acceptSslCerts":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chrome":{"chromedriverVersion":"2.40.565498 (ea082db3280dd6843ebfb08a625e3eb905c4f5ab)","userDataDir":"C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\scoped_dir4328_23411"},"cssSelectorsEnabled":true,"databaseEnabled":false,"handlesAlerts":true,"hasTouchScreen":false,"javascriptEnabled":true,"locationContextEnabled":true,"mobileEmulationEnabled":false,"nativeEvents":true,"networkConnectionEnabled":false,"pageLoadStrategy":"normal","platform":"Windows NT","rotatable":false,"setWindowRect":true,"takesHeapSnapshot":true,"takesScreenshot":true,"unexpectedAlertBehaviour":"","version":"67.0.3396.99","webStorageEnabled":true},"sessionId":"ab33649d86852438db5447ae22510b76"}}
Running: GLGLAuto
__WD_Post: URL=HTTP://127.0.0.1:9515/session/ab33649d86852438db5447ae22510b76/url; $sData={"url":"http://www.glgl.cc:8088/Login.aspx"}
__WD_Post: StatusCode=200; ResponseText={"value":null}
_WD_Navigate: {"value":null}
__WD_Post: URL=HTTP://127.0.0.1:9515/session/ab33649d86852438db5447ae22510b76/element; $sData={"using":"xpath","value":"//input[@id='T_uid']"}
__WD_Post: StatusCode=200; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"a2b414a7-1ef9-4773-b991-58c579de5878"}}
_WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"a2b414a7-1ef9-4773-b991-58c579de5878"}}
__WD_Post: URL=HTTP://127.0.0.1:9515/session/ab33649d86852438db5447ae22510b76/element/a2b414a7-1ef9-4773-b991-58c579de5878/clear; $sData={"id":"a2b414a7-1ef9-4773-b991-58c579de5878"}
__WD_Post: StatusCode=200; ResponseText={"value":null}
_WD_ElementAction: {"value":null}
__WD_Post: URL=HTTP://127.0.0.1:9515/session/ab33649d86852438db5447ae22510b76/element/a2b414a7-1ef9-4773-b991-58c579de5878/value; $sData={"id":"a2b414a7-1ef9-4773-b991-58c579de5878", "text":"5300", "value":["5","3","0","0"]}
__WD_Post: StatusCode=200; ResponseText={"value":null}
_WD_ElementAction: {"value":null}
__WD_Post: URL=HTTP://127.0.0.1:9515/session/ab33649d86852438db5447ae22510b76/element; $sData={"using":"xpath","value":"//input[@id='T_pwd']"}
__WD_Post: StatusCode=200; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"f55b0de1-e1ab-409c-b1fa-feb58c7cddc8"}}
_WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"f55b0de1-e1ab-409c-b1fa-feb58c7cddc8"}}
__WD_Post: URL=HTTP://127.0.0.1:9515/session/ab33649d86852438db5447ae22510b76/element/f55b0de1-e1ab-409c-b1fa-feb58c7cddc8/value; $sData={"id":"f55b0de1-e1ab-409c-b1fa-feb58c7cddc8", "text":"789456", "value":["7","8","9","4","5","6"]}
__WD_Post: StatusCode=200; ResponseText={"value":null}
_WD_ElementAction: {"value":null}
__WD_Post: URL=HTTP://127.0.0.1:9515/session/ab33649d86852438db5447ae22510b76/element; $sData={"using":"xpath","value":"//div[@id='ligerui1002']/table/tbody/tr[2]/td[2]/div/div[2]/div/div/div[3]"}
__WD_Post: StatusCode=200; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"7f9052b8-b4b8-404b-b106-4325da4e4a61"}}
_WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"7f9052b8-b4b8-404b-b106-4325da4e4a61"}}
__WD_Post: URL=HTTP://127.0.0.1:9515/session/ab33649d86852438db5447ae22510b76/element/7f9052b8-b4b8-404b-b106-4325da4e4a61/click; $sData={"id":"7f9052b8-b4b8-404b-b106-4325da4e4a61"}
__WD_Post: StatusCode=200; ResponseText={"value":null}
_WD_ElementAction: {"value":null}
__WD_Post: URL=HTTP://127.0.0.1:9515/session/ab33649d86852438db5447ae22510b76/element; $sData={"using":"xpath","value":"//div[@id='toolbar']/div[4]/span"}
__WD_Post: StatusCode=200; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"15b309f9-a478-4f80-8b35-1a5191787dbb"}}
_WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"15b309f9-a478-4f80-8b35-1a5191787dbb"}}
__WD_Post: URL=HTTP://127.0.0.1:9515/session/ab33649d86852438db5447ae22510b76/element/15b309f9-a478-4f80-8b35-1a5191787dbb/click; $sData={"id":"15b309f9-a478-4f80-8b35-1a5191787dbb"}
__WD_Post: StatusCode=200; ResponseText={"value":null}
_WD_ElementAction: {"value":null}
__WD_Post: URL=HTTP://127.0.0.1:9515/session/ab33649d86852438db5447ae22510b76/element; $sData={"using":"xpath","value":"//div[@id='accordion1']/div[2]/ul/li/span"}
__WD_Post: StatusCode=200; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"5383702e-6bc1-408a-b5a1-182b21d5dc70"}}
_WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"5383702e-6bc1-408a-b5a1-182b21d5dc70"}}
__WD_Post: URL=HTTP://127.0.0.1:9515/session/ab33649d86852438db5447ae22510b76/element/5383702e-6bc1-408a-b5a1-182b21d5dc70/click; $sData={"id":"5383702e-6bc1-408a-b5a1-182b21d5dc70"}
__WD_Post: StatusCode=200; ResponseText={"value":null}
_WD_ElementAction: {"value":null}
__WD_Post: URL=HTTP://127.0.0.1:9515/session/ab33649d86852438db5447ae22510b76/frame; $sData={"id":{"element-6066-11e4-a52e-4f735466cecf":"tabid60"}}
__WD_Post: StatusCode=500; ResponseText={"value":{"error":"unknown error","message":"missing 'ELEMENT'(Session infochrome=67.0.3396.99)","stacktrace":"Backtrace:\n\tOrdinal0 [0x013BDF70+778096]\n\tOrdinal0 [0x0136B42D+439341]\n\tOrdinal0 [0x0134807F+295039]\n\tOrdinal0 [0x01330619+198169]\n\tOrdinal0 [0x01328349+164681]\n\tOrdinal0 [0x0132F96B+194923]\n\tOrdinal0 [0x0132824F+164431]\n\tOrdinal0 [0x01311B45+72517]\n\tOrdinal0 [0x01312F2A+77610]\n\tOrdinal0 [0x01312ECC+77516]\n\tGetHandleVerifier [0x01459936+3478]\n\tOrdinal0 [0x013C88C3+821443]\n\tOrdinal0 [0x01377066+487526]\n\tOrdinal0 [0x01377393+488339]\n\tOrdinal0 [0x013774A3+488611]\n\tOrdinal0 [0x013CAA67+830055]\n\tOrdinal0 [0x01376DAF+486831]\n\tOrdinal0 [0x013813FE+529406]\n\tOrdinal0 [0x0138C57B+574843]\n\tOrdinal0 [0x0138C6CD+575181]\n\tOrdinal0 [0x0138B92B+571691]\n\tBaseThreadInitThunk [0x74EA62C4+36]\n\tRtlSubscribeWnfStateChangeNotification [0x77EA0FA9+1081]\n\tRtlSubscribeWnfStateChangeNotification [0x77EA0F74+1028]\n"}}
_WD_Window: {"value":{"error":"unknown error","message":"missing 'ELEMENT'(Session infochrome=67.0.3396.99)","stacktrace":"Backtrace:\n\tOrdinal0 [0x013BDF70+778096]\n\tOrdinal0 [0x0136B42D+439341]\n\tOrdinal0 [0x0134807F+295039]\n\tOrdinal0 [0x01330619+198169]\n\tOrdinal0 [0x01328349+164681]\n\tOrdinal0 [0x0132F96B+194923]\n\tOrdinal0 [0x0132824F+164431]\n\tOrdinal0 [0x01311B45+72517]\n\tOrdinal0 [0x01312F2A+77610]\n\tOrdinal0 [0x01312ECC+77516]\n\tGetHandleVerifier [0x01459936+3478]\n\tOrdinal0 [0x013C88C3+821443]\n\tOrdinal0 [0x01377066+487526]\n\tOrdinal0 [0x01377393+488339]\n\tOrdinal0 [0x013774A3+488611]\n\tOrdinal0 [0x013CAA67+830055]\n\tOrdinal0 [0x01376DAF+486831]\n\tOrdinal0 [0x013813FE+529406]\n\tOrdinal0 [0x0138C57B+574843]\n\tOrdinal0 [0x0138C6CD+575181]\n\tOrdinal0 [0x0138B92B+571691]\n\tBaseThreadInitThunk [0x74EA62C4+36]\n\tRtlSubscribeWnfStateChangeNotification [0x77EA0FA9+1081]\n\tRtlSubscribeWnfStateChangeNotification [0x77EA0F74+1028]\n"}}
__WD_Post: URL=HTTP://127.0.0.1:9515/session/ab33649d86852438db5447ae22510b76/element; $sData={"using":"xpath","value":"//*[@id='toolbar']/div[2]/span"}
__WD_Post: StatusCode=200; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"b06ac027-ea0b-4141-a22d-48412e0dca2d"}}
_WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"b06ac027-ea0b-4141-a22d-48412e0dca2d"}}
__WD_Post: URL=HTTP://127.0.0.1:9515/session/ab33649d86852438db5447ae22510b76/element/b06ac027-ea0b-4141-a22d-48412e0dca2d/click; $sData={"id":"b06ac027-ea0b-4141-a22d-48412e0dca2d"}
__WD_Post: StatusCode=200; ResponseText={"value":null}
_WD_ElementAction: {"value":null}

frame.jpg.b513342b529c0d46e12ab621e34e24ec.jpg

Link to post
Share on other sites
Did you look at the examples in wd_test.au3?

I did some research on getting the attribute values and posting the links found and some sample codes here. Hope it will help people like me who are new to webdriver concepts.

options for attributes

How to get options to use with attribute command on _WD_ElementAction

$sCommand = 'attribute'
        $sOption = 'class'
        $sRes = _WD_ElementAction($sSession, $sElementId, $sCommand, $sOption) 
        
        $sCommand = 'attribute'
        $sOption = 'name'
        $sRes = _WD_ElementAction($sSession, $sElementId, $sCommand, $sOption) 
        
        $sCommand = 'attribute'
        $sOption = 'id'
        $sRes = _WD_ElementAction($sSession, $sElementId, $sCommand, $sOption) 
        
        $sCommand = 'attribute'
        $sOption = 'status'
        $sRes = _WD_ElementAction($sSession, $sElementId, $sCommand, $sOption) 
        
        $sCommand = 'attribute'
        $sOption = 'aria-label'
        $sRes = _WD_ElementAction($sSession, $sElementId, $sCommand, $sOption) 
        
        $sCommand = 'attribute'
        $sOption = 'href'
        $sRes = _WD_ElementAction($sSession, $sElementId, $sCommand, $sOption)

 

Link to post
Share on other sites

    _WD_Navigate($sSession, "http://www.glgl.cc:8088/Login.aspx")
    $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@id='T_uid']")
    _WD_ElementAction($sSession, $sElement, 'clear')
    Sleep(500)
    _WD_ElementAction($sSession, $sElement, 'value', "****")
    Sleep(500)
    $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@id='T_pwd']")
    _WD_ElementAction($sSession, $sElement, 'value', "")
    Sleep(200)
    Send("{ENTER}")
    Sleep(500)
    $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@id='ligerui1002']/table/tbody/tr[2]/td[2]/div/div[2]/div/div/div[3]")
    _WD_ElementAction($sSession, $sElement, 'click')
    Sleep(200)
    $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@id='toolbar']/div[4]/span")
    _WD_ElementAction($sSession, $sElement, 'click')
    Sleep(200)
    $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//div[@id='accordion1']/div[2]/ul/li/span")
    _WD_ElementAction($sSession, $sElement, 'click')
    Sleep(200)
    $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//*[@id='framecenter']/div[2]/div[2]")
    _WD_FrameEnter($sSession, $sElement)
    Sleep(300)
    $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//*[@id='toolbar']/div[2]/span")

Link to post
Share on other sites

On Chrome getting a property always results in an error from driver

unknown command: session/6db9b39372f1e39e3cf593ed4e70adba/element/880fa92f-cd9f-4fd9-bef2-079d2669d8ff/property/value

 

$sRes = _WD_ElementAction($sSession, $sElement, 'property', 'value')

Any hint to the problem?

Link to post
Share on other sites
9 minutes ago, Danp2 said:

@PoojaKrishna Chrome seems to be behind on implementing the webdriver W3C specs. See here for details on this particular matter.

Also, you can get an overall view of their implementation status here.

 

Thank you so much for the reply Danp2. Yes, the bug is still open on the following link:

Get Property Bug on Chrome

And Get Rect too has issues with some elements. Is there any other known way to get the size and location of an element?

Link to post
Share on other sites
45 minutes ago, PoojaKrishna said:

And Get Rect too has issues with some elements.

Can you provide some examples where this doesn't work?

46 minutes ago, PoojaKrishna said:

Is there any other known way to get the size and location of an element?

Probably could retrieve the values using _WD_ExecuteScript / Javascript.

Link to post
Share on other sites
11 minutes ago, Danp2 said:

Can you provide some examples where this doesn't work?

Probably could retrieve the values using _WD_ExecuteScript / Javascript.

Can You please see my reply on page 9, Posted Wednesday at 03:08 PM regarding the rect? I have posted a screen shot also there. The element I try to get rect  is highlighted on image. Not only the element on that page, but that is a sample.

Link to post
Share on other sites

Seems to be Chrome Driver does not support "property" command

But Chrome and Firefox both support "attribute" command

Local $sRes = _WD_ElementAction($sSession, $sElement, 'attribute', 'value')

Saludos

Link to post
Share on other sites
14 hours ago, Danp2 said:

@PoojaKrishna Yes, I remember that now. I believe I took a quick look at it back then, but I'll have another look. It's possible that we'll need to file a bug report with the Chromedriver folks.

Yes, I'm attaching the responses we receive back from the web driver in both cases. 

On Success:

{"value":{"height":28,"width":370,"x":498,"y":294}}

On Error: 

{"value":{"error":"unknown error","message":"getting size failed to return x(Session infochrome=67.0.3396.99)","stacktrace":"Backtrace:\n\tOrdinal0 [0x0098DF70+778096]\n\tOrdinal0 [0x0093B42D+439341]\n\tOrdinal0 [0x0091807F+295039]\n\tOrdinal0 [0x008E5D2D+89389]\n\tOrdinal0 [0x008F8349+164681]\n\tOrdinal0 [0x008E39C0+80320]\n\tOrdinal0 [0x008F8521+165153]\n\tOrdinal0 [0x008FF96B+194923]\n\tOrdinal0 [0x008F824F+164431]\n\tOrdinal0 [0x008E1B45+72517]\n\tOrdinal0 [0x008E2F2A+77610]\n\tOrdinal0 [0x008E2ECC+77516]\n\tGetHandleVerifier [0x00A29936+3478]\n\tOrdinal0 [0x009988C3+821443]\n\tOrdinal0 [0x00947066+487526]\n\tOrdinal0 [0x00947393+488339]\n\tOrdinal0 [0x009474A3+488611]\n\tOrdinal0 [0x0099AA67+830055]\n\tOrdinal0 [0x00946DAF+486831]\n\tOrdinal0 [0x009513FE+529406]\n\tOrdinal0 [0x0095C57B+574843]\n\tOrdinal0 [0x0095C6CD+575181]\n\tOrdinal0 [0x0095B92B+571691]\n\tBaseThreadInitThunk [0x76158484+36]\n\tRtlValidSecurityDescriptor [0x77442FEA+282]\n\tRtlValidSecurityDescriptor [0x77442FBA+234]\n"}}

And in some cases it fails to return y.

and  we need a different case or additional steps for command 'rect' on wd_core.au3 -> _WD_ElementAction . 

$oJson = Json_Decode($sResponse)
$sX = Json_Get($oJson, "[value][x]")
$sY = Json_Get($oJson, "[value][Y]")
$sHeight = Json_Get($oJson, "[value][height]")
$sWidth = Json_Get($oJson, "[value][width]")

 

 

Edited by PoojaKrishna
Added parsing for 'rect' command.
Link to post
Share on other sites

You may please use the following function for testing the 'rect'.  For the element's that returns an error, all elements of the resulting array is null.

; #FUNCTION# ====================================================================================================================
; Name ..........: _WD_ElementRect
; Description ...: Get rect of element
; Syntax ........: _WD_ElementRect($sSession, $sElement)
; Parameters ....: $sSession            - Session ID from _WDCreateSession
;                  $sElement            - Element ID from _WDFindElement
; Return values .: Success      - Returns a four-element array containing $aResult[0] = height, $aResult[1] = width, $aResult[2] = x, $aResult[3] = y
;                  Failure      - ""
;                  @ERROR       - $_WD_ERROR_Success
;                               - $_WD_ERROR_Exception
;                               - $_WD_ERROR_InvalidDataType
;                  @EXTENDED    - WinHTTP status code
; Author ........:
; Modified ......:
; Remarks .......:
; Related .......:
;                  https://w3c.github.io/webdriver/#get-element-rect
; Example .......: No
; ===============================================================================================================================
Func _WD_ElementRect($sSession, $sElement)
    Local Const $sFuncName = "_WD_ElementRect"
    Local $sResponse, $aResult[4] = [0], $iErr, $oJson
    $sResponse = __WD_Get($_WD_BASE_URL & ":" & $_WD_PORT & "/session/" & $sSession & "/element/" & $sElement & "/rect")
    $iErr = @error
    If $iErr = $_WD_ERROR_Success Then
        $oJson = Json_Decode($sResponse)
        $aResult[0] = Json_Get($oJson, "[value][height]")
        $aResult[1] = Json_Get($oJson, "[value][width]")
        $aResult[2] = Json_Get($oJson, "[value][x]")
        $aResult[3] = Json_Get($oJson, "[value][y]")
    EndIf
    If $_WD_DEBUG Then
        ConsoleWrite($sFuncName & ': ' & $sResponse & @CRLF)
    EndIf
    If $iErr Then
        Return SetError(__WD_Error($sFuncName, $_WD_ERROR_Exception, $sResponse), $_WD_HTTPRESULT, "")
    EndIf
    Return SetError($_WD_ERROR_Success, $_WD_HTTPRESULT, $aResult)
EndFunc   ;==>_WD_ElementRect

 

Link to post
Share on other sites

change:

$sOption = '{"id":"' & $sIndexOrID & '"}'

Output:

__WD_Post: URL=HTTP://127.0.0.1:9515/session/546ab70e8c384f8afd93a2898d8993d6/element; $sData={"using":"xpath","value":"//*[@id="framecenter"]/div[2]/div[2]/iframe"}
__WD_Post: StatusCode=400; ResponseText=missing command parameters
_WD_FindElement: missing command parameters
_WD_FindElement ==> Webdriver Exception: HTTP status = 400
__WD_Post: URL=HTTP://127.0.0.1:9515/session/546ab70e8c384f8afd93a2898d8993d6/frame; $sData={"id":""}
__WD_Post: StatusCode=404; ResponseText={"value":{"error":"no such frame","message":"(Session infochrome=67.0.3396.99)","stacktrace":"Backtrace:\n\tOrdinal0 [0x009CDF70+778096]\n\tOrdinal0 [0x0097B42D+439341]\n\tOrdinal0 [0x00957E1D+294429]\n\tOrdinal0 [0x0095A2C1+303809]\n\tOrdinal0 [0x00940787+198535]\n\tOrdinal0 [0x00938349+164681]\n\tOrdinal0 [0x0093F96B+194923]\n\tOrdinal0 [0x0093824F+164431]\n\tOrdinal0 [0x00921B45+72517]\n\tOrdinal0 [0x00922F2A+77610]\n\tOrdinal0 [0x00922ECC+77516]\n\tGetHandleVerifier [0x00A69936+3478]\n\tOrdinal0 [0x009D88C3+821443]\n\tOrdinal0 [0x00987066+487526]\n\tOrdinal0 [0x00987393+488339]\n\tOrdinal0 [0x009874A3+488611]\n\tOrdinal0 [0x009DAA67+830055]\n\tOrdinal0 [0x00986DAF+486831]\n\tOrdinal0 [0x009913FE+529406]\n\tOrdinal0 [0x0099C57B+574843]\n\tOrdinal0 [0x0099C6CD+575181]\n\tOrdinal0 [0x0099B92B+571691]\n\tBaseThreadInitThunk [0x747062C4+36]\n\tRtlSubscribeWnfStateChangeNotification [0x77141EB9+1081]\n\tRtlSubscribeWnfStateChangeNotification [0x77141E84+1028]\n"}}
_WD_Window: {"value":{"error":"no such frame","message":"(Session infochrome=67.0.3396.99)","stacktrace":"Backtrace:\n\tOrdinal0 [0x009CDF70+778096]\n\tOrdinal0 [0x0097B42D+439341]\n\tOrdinal0 [0x00957E1D+294429]\n\tOrdinal0 [0x0095A2C1+303809]\n\tOrdinal0 [0x00940787+198535]\n\tOrdinal0 [0x00938349+164681]\n\tOrdinal0 [0x0093F96B+194923]\n\tOrdinal0 [0x0093824F+164431]\n\tOrdinal0 [0x00921B45+72517]\n\tOrdinal0 [0x00922F2A+77610]\n\tOrdinal0 [0x00922ECC+77516]\n\tGetHandleVerifier [0x00A69936+3478]\n\tOrdinal0 [0x009D88C3+821443]\n\tOrdinal0 [0x00987066+487526]\n\tOrdinal0 [0x00987393+488339]\n\tOrdinal0 [0x009874A3+488611]\n\tOrdinal0 [0x009DAA67+830055]\n\tOrdinal0 [0x00986DAF+486831]\n\tOrdinal0 [0x009913FE+529406]\n\tOrdinal0 [0x0099C57B+574843]\n\tOrdinal0 [0x0099C6CD+575181]\n\tOrdinal0 [0x0099B92B+571691]\n\tBaseThreadInitThunk [0x747062C4+36]\n\tRtlSubscribeWnfStateChangeNotification [0x77141EB9+1081]\n\tRtlSubscribeWnfStateChangeNotification [0x77141E84+1028]\n"}}

code is:

$sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, '//*[@id="framecenter"]/div[2]/div[2]/iframe')
    $siFrame = _WD_FrameEnter($sSession, $sElement)
    Sleep(300)
    If $siFrame Then MsgBox(64,"",$siFrame)

This is my normal operation on the kantu plugin:

1.thumb.jpg.bcb4f67ace0f521aabb476673152bc6f.jpg

byname here that I should use?

selenium Class By.ByName

Link to post
Share on other sites
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Danp2
      Introduction
      This UDF will allow you to interact with any browser that supports the W3C WebDriver specifications. Supporting multiple browsers via the same code base is now possible with just a few configuration settings.
      Requirements
      JSON UDF https://www.autoitscript.com/forum/topic/148114-a-non-strict-json-udf-jsmn
      WinHTTP UDF https://www.autoitscript.com/forum/topic/84133-winhttp-functions/
      HtmlTable2Array UDF (optional) https://www.autoitscript.com/forum/topic/167679-read-data-from-html-tables-from-raw-html-source/
      WebDriver for desired browser
      Chrome WebDriver https://sites.google.com/a/chromium.org/chromedriver/downloads FireFox WebDriver https://github.com/mozilla/geckodriver/releases Edge WebDriver https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ Source Code
      You will always be able to find the latest version in the GitHub Repo 
      Help / Support
      See the wiki for details on the UDF --
      https://www.autoitscript.com/wiki/WebDriver
      Please post any questions, suggestions or errors in the GH&S thread.
      https://www.autoitscript.com/forum/topic/205553-webdriver-udf-help-support-iii/
      Previous support threads (Closed)
      https://www.autoitscript.com/forum/topic/192730-webdriver-udf-help-support/
      https://www.autoitscript.com/forum/topic/201106-webdriver-udf-help-support-ii/
       
    • By goku200
      I am trying to change the settings of the print option to Save as PDF and its not changing the settings and clicking on the Save button at the bottom. Here is my script that I have written and the format is correct below. Chrome browser I'm using is 97.0 My script was working fine using Chrome 95.0\ Not sure why its not working now
      It finds the print-preview-app element but not the others.
       
    • By goku200
      I am trying to hit the Return key without having to use the Send keys. I have the following code and its not hitting the Return key. Am I missing something?
      ; Press Return $sAction = '{"actions":[{"type": "key", "id": "keyboard_1", "actions": [{"type": "keyDown", "value": "\uE006"},' ; Pause $sAction &= '{"type": "pause", "duration": 500},' ; Release Return $sAction &= '{"type": "keyUp", "value": "\uE006"}]}]}' _WD_Action($sSession, "actions", $sAction)  
    • By goku200
      I'm having an issue with my html paginated table. The script work as expected. It reads the html table and clicks on the Download button. However when it clicks on the next page its not iterating the items. instead it goes to the next URL from the spreadsheet and then iterates through the html table clicking the Download button and so on. Not sure why its doing that. I want it to click the next page and then continue iterating then after it has reached the end of the pagination go to the next url in the spreadsheet and repeat the process. Below is my script. Any help is appreciated 🙂
       
       
    • By goku200
      I'm having some issues with my script that's not grabbing the id from the cell and appending it to the url test that I have in my script.
      Here is my script:
      What I'm having issues is looping through the id column in the excel spreadsheet and adding 1 to the url address when its tabbed by using _WD_NewTab. When it goes to the browser I'm wanting it to display: https://127.0.0.1/test.html?id=1 press Enter and save the file as 1.html and so forth for the others. Not sure what I'm doing wrong here. 
       
×
×
  • Create New...