Forum Discussion

Preetha's avatar
Preetha
Occasional Contributor
6 years ago

aqObject.CheckProperty to verify the item selected in the dropdown

Hi 

I am new to test complete scripting.

I am using chrome . Need to verify the default value selected in the dropdown.

 

the below code is used

titleCombo = p.NativeWebObject.Find("id","TitleId","SELECT");
Log.Message(titleCombo.wSelectedItem);  // returning 0
aqObject.CheckProperty(titleCombo,"titleCombo.wSelectedItem",cmpEqual,"0");

 

It is throwing error saying invalid property name. Pls help

  • Hi,

     

    The name of the property is wSelectedItem but not the titleCombo.wSelectedItem.

    Thus, I think that the last line should be like this:

    aqObject.CheckProperty(titleCombo,"wSelectedItem",cmpEqual,"0");

     

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    The name of the property is wSelectedItem but not the titleCombo.wSelectedItem.

    Thus, I think that the last line should be like this:

    aqObject.CheckProperty(titleCombo,"wSelectedItem",cmpEqual,"0");