Ask a Question

Help needed in parametrizing lists inside dropdowns

SOLVED
bing098911
New Contributor

Help needed in parametrizing lists inside dropdowns

Can someone provide details on how to add parameters to populate an item from a dropdown list? I didn't find any community support threads so my apologies if this has already been mentioned. I have some drop downs that show all list items and some that have too many items so you must type all or part of the name to get it to populate in the list results. I need a solution for both! This will be extremely useful to data drive my test cases. Thank you!!!

4 REPLIES 4
ebarbera
Staff

Hi @bing098911 -

Take a look at this document - there is a section that covers how to use a variable in an xpath https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/xpat...

I don’t believe it’s possible to use a parameter directly in the xpath, but you can drive a variable based on your parameter.

Let me know if you have further questions.

Cheers,
Emma

Hey Emma!

Thanks for the reply. I finally got back to this and am still having some issues. Below are a few screenshots showing the Reponsibility variable I setup and am trying to use in a drop down selection. Any ideas why I'm getting the error? I've tried this with and without the " ' " surrounding the %ReportNameVar%. Appreciate the help!

 

bing098911_1-1621020822671.png

 

 

bing098911_0-1621020754991.png

 

bing098911_2-1621020829912.png

 

 

Hi @bing098911 - 

 

I believe for this to work they have to be project level variables - so try adding those at the project level instead of in the test case. 

 

See if that helps!

 

Emma

sonya_m
SmartBear Alumni (Retired)

Thank you Emma!

 

@bing098911 does the advice help?


Sonya Mihaljova
Community and Education Specialist

cancel
Showing results for 
Search instead for 
Did you mean: