Jump to content

Recommended Posts

Posted

Hi again legends. After my last question about trying to get an element's "busy" status, I was eventually able to get it working by digging down into nested frames and manually checking if a certain element was visible using _WD_ElementAction. Great!

Fast forward a few months and I go to run the script to find it won't even open Chrome anymore. Updated chromedriver.exe and that was resolved but now the part of my code that checks for the visibility has stopped working and I'm wondering what has possibly changed in the new version of chromedriver.exe?

It seems to be failing at the point of digging down into the frame layers. To the best of my knowledge, nothing has changed in the HTML of the site itself.

My code:

$sTopFrame = _WD_FindElement($SessionID, $_WD_LOCATOR_ByXPath, '//iframe[@name="TopFrame" and @id="TopFrame"]')
      If $bDebugEnabled = True Then
          ConsoleWrite(("TopFrame is: " & $sTopFrame & @CRLF))
      EndIf
    _WD_FrameEnter($SessionID, $sTopFrame)
    $sWorkAreaFrame = _WD_FindElement($SessionID, $_WD_LOCATOR_ByXPath, '//frame[@name="NextFrame" and @id="NextFrame"]')
      If $bDebugEnabled = True Then
          ConsoleWrite(("NextFrame is: " & $sWorkAreaFrame & @CRLF))
      EndIf
    _WD_FrameEnter($SessionID, $sWorkAreaFrame)
    $sLoadingDIV = _WD_FindElement($SessionID, $_WD_LOCATOR_ByXPath, '//div[@id="LoadingIcon" and @class="LoadingIconClass"]')
      If $bDebugEnabled = True Then
          ConsoleWrite("Loading DIV is: " & $sLoadingDIV & @CRLF)
      EndIf

My output when trying to enter the top frame:

_WD_FindElement ==> Success [0] : Parameters:   Strategy=xpath   Selector=//iframe[@name="TopFrame" and @id="TopFrame"]   StartNodeID=Default   Multiple=Default   ShadowRoot=Default

Top Frame is: 99570E30615E42E271B6BD94337A0532_element_156

_WD_FrameEnter ==> Invalid argument [5] : Parameters:    Identifier=99570E30615E42E271B6BD94337A0532_element_156

__WD_Post ==> No match [8] : HTTP status = 404

So it looks like the top frame is successfully identified and stored correctly to a variable but when I try and pass it to _WD_FrameEnter (which worked fine before) it is now giving me an error instead. Not sure if the __WD_Post line is relevant, but I do wonder if the "_element_156" string at the end of the identifier might have something to do with it...

Would really appreciate if someone could point me in the right direction on this one. Thanks.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...