Forum Discussion

AutoBot_1's avatar
AutoBot_1
Occasional Contributor
15 years ago

TC8.5: EvaluateXPath not working with IE

Hi,



I am trying to identify a web object using the Xpath function introduced in TestComplete 8.5



In the below code, I am trying to get the radio button on an airline site (aa.com) and then click it.

This piece works absolutely fine with Firefox browser but not with IE.



Is there something I am missing in case of IE ??

Please suggest a solution.



Here is the code:



Sub VerifyXpath()






  Dim objBrowser, objPage, objWebObject


  'set objBrowser = Sys.Process("firefox")

   set objBrowser = Sys.Process("iexplore")



  


  set objPage = objBrowser.Page("*")


    


  XPATH_STR = "//*[@id='flightSearchForm.tripType.oneWay']" 






  'Gets stuck at this point ---- 


  set objWebObject = objPage.EvaluateXPath(XPATH_STR)






  if Not IsNull(objWebObject) then


     objWebObject(0).Click

  else


    log.Message "Object Not Found" 


  end if






End Sub



Thanks,

AutoBot

12 Replies