Forum Discussion
You don't say which part changes, but I'm going to go with the URL being stable. I would define a variable with a short name to be equal to your URL string and then use the variable in the page name.
Hi Marsha,
The part that keeps changing is highlighted in blue:
Sys.Browser("chrome").Page("https://uat.testenviroment-test.com/customers/").Panel("portal").Panel(0).Panel(0).Panel(0).Panel(2).Panel(1).Panel(0).Panel(0).Panel(0).Panel(1).Panel(0).Panel(1).Panel(0).Panel(0).Button(0)
Please provide with illustrative example in here.
I would like to achieve 2 things if possible:
1. To shorten this object id.
2. To use a wild card on the these panels as they keep changing.
Many Thanks,
Az.
- Marsha_R3 years agoModerator
Try
Sys.Browser("chrome").Page("https://uat.testenviroment-test.com/customers/").Panel("portal").*.Button(0)
- Azeddin_Margani3 years agoContributor
Hi,
Do i need to declare the use of * anywhere in TestComplete because it tells me Unexpected Token *.
Thanks,
Az.
- ebarbera3 years agoStaff
Hi Azeddin_Margani -
Yes - the wildcard should be applied from within the NameMapping section. To accomplish this you would first add the element to your repository and then map it based on the property you have listed with the wildcard in the property portion of the NameMapping area.
https://support.smartbear.com/testcomplete/docs/reference/misc/using-wildcards.html
Let me know if you have any other questions.
Emma
Related Content
- 3 years ago
Recent Discussions
- 2 days ago