cancel
Showing results for 
Search instead for 
Did you mean: 

Aliase.page assining a Variable

SOLVED
Highlighted
Regular Visitor

Aliase.page assining a Variable

I am trying to do an edit on an object and select a value from the drop down.  When I select the object its being created with the client number. I want to assign a Variable so I can re-use the same code looping through different clients. I have tried but keep getting object not found. I am new to test complete so maybe missing a very simple step. I want to have the 664006 as a variable. Java

 

  let page = Aliases.browser.page664006
  let form = page.formEditclient;
  form.select.ClickItem("No");
  form.select2.ClickItem("Yes");
  page.buttonSave.ClickButton();

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Manager

Thank you for trying to help here, Alex!

 

@emma_cheeseman I see that you opened a support case and got a reply there. Let me post it to the Community:

 

>>

If I understand correctly, when you open a page with the specific client ID, the page URL is modified so it contains this ID.
 
This could prevent tests from working indeed when a page is mapped in Name Mapping by the URL with this ID. However, this variable part of the URL can be just ignored. For this, you can use the wildcard (see Using Wildcards [https://support.smartbear.com/testcomplete/docs/reference/misc/using-wildcards.html]).

<<


Sonya Mihaljova
Community and Education Specialist

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today

View solution in original post

2 REPLIES 2
Highlighted
Community Hero

Hi,

 

I have tried but keep getting object not found.

What line from your code sample throws this error?

 

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
================================
Highlighted
Community Manager

Thank you for trying to help here, Alex!

 

@emma_cheeseman I see that you opened a support case and got a reply there. Let me post it to the Community:

 

>>

If I understand correctly, when you open a page with the specific client ID, the page URL is modified so it contains this ID.
 
This could prevent tests from working indeed when a page is mapped in Name Mapping by the URL with this ID. However, this variable part of the URL can be just ignored. For this, you can use the wildcard (see Using Wildcards [https://support.smartbear.com/testcomplete/docs/reference/misc/using-wildcards.html]).

<<


Sonya Mihaljova
Community and Education Specialist

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Get properties of a web page element

See replies!

Compare images using the Region Checkpoint

See replies!

Compare HTML table with Excel file and correct data in Excel file

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!
Top Kudoed Authors