cancel
Showing results for 
Search instead for 
Did you mean: 

aqObject.CheckProperty to verify the item selected in the dropdown

SOLVED
Highlighted
Occasional Contributor

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: aqObject.CheckProperty to verify the item selected in the dropdown

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");

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

2 REPLIES 2
Highlighted
Community Hero

Re: aqObject.CheckProperty to verify the item selected in the dropdown

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");

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

Occasional Contributor

Re: aqObject.CheckProperty to verify the item selected in the dropdown

Thanks it is working.

New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
Let's start July with new challenges!

Create a script to pass custom command-line arguments as a test parameter for the TechCorner tag!

Will you dare to take the challenge?


Top Kudoed Authors