Forum Discussion

nimi_ummer's avatar
nimi_ummer
New Contributor
12 years ago

object caption with \\ is displayed as \

The following code is always failing:



var oExportPathField = oUnisphere.FindChild("FlexObject.automationName", "generalExportPath", 4, true);

  aqObject.CheckProperty(oExportPathField, "Caption", cmpEqual, "\\\\" + sNasServerIp

                                                                       + "\\" + sShare);



with the error:




The "Caption" property of the "Sys.Browser("iexplore").Page("https://10.109.13.81/index.html#lcn=neoArea:applications:12:sharedFolderDetails:cifsShareDetails&&ctxt=:::id=root%2Femc%3AEMC_UEM_ApplicationLeaf%25InstanceID%3Dres_10:id=root%2Femc%3AEMC_UEM_CIFSShareLeaf%25InstanceID%3DCIFSShare_3").Object("UxPreloader").UxPreloader("UxPreloader").Canvas("generalCanvas").Form("form").Text("generalExportPath")" object does not meet the checkpoint's condition.
































Object name:

Sys.Browser("iexplore").Page("https://10.109.13.81/index.html#lcn=neoArea:applications:12:sharedFolderDetails:cifsShareDetails&&ctxt=:::id=root%2Femc%3AEMC_UEM_ApplicationLeaf%25InstanceID%3Dres_10:id=root%2Femc%3AEMC_UEM_CIFSShareLeaf%25InstanceID%3DCIFSShare_3").Object("UxPreloader").UxPreloader("UxPreloader").Canvas("generalCanvas").Form("form").Text("generalExportPath")

Property:

Caption

Actual value

"\10.245.252.200\CIFSShare_2013042243"

Expected value

"\\10.245.252.200\CIFSShare_2013042243"

Condition

cmpEqual

Case-sensitive

true





The displayed object on gui is "\\10.245.252.200\CIFSShare_2013042243" however the property checkpoint always fails.



I am using TC 9.2 and IE8 for testing. I am using JScript for my project.

How do I rectify this?

3 Replies


  • Hi Nimi,


     


    I've failed to reproduce this in TestComplete 9.31. Could you please update to the latest TestComplete version to check whether the problem disappears?


    If it doesn't, please set the breakpoint to the following line:


     aqObject.CheckProperty(oExportPathField, "Caption", cmpEqual, "\\\\" + sNasServerIp + "\\" + sShare);


    and debug the oExportPathField variable. What value does TestComplete show?


     

  • nimi_ummer's avatar
    nimi_ummer
    New Contributor
    It seems that the script owner developed it using IE9. I installed IE9 and executed the test it passes. I tried everything with IE8, but it didn't work.

  • Hi Nimi,


     


    As far as I can see, IE 8 and IE 9 install different versions of the script engine. To my mind, only this may affect the situation. 


    Have you tried debugging the problematic line? Could you please answer the question from my previous post?