cancel
Showing results for 
Search instead for 
Did you mean: 

Search for dynamic id when creating an item Keywordtest

SOLVED
Highlighted
New Contributor

Search for dynamic id when creating an item Keywordtest

I have a use case where a new item is created with every test run. Every time a new item is created, a new ID is also generated.

After the item is created, I have to use the ID of that specific item in a search bar. I just can't figure out how to do that. Is there anyone who can help me?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: Search for dynamic id when creating an item Keywordtest

Yes, it will be automatic. 

 

https://support.smartbear.com/testcomplete/docs/keyword-testing/variables.html

 

You want the part in here that talks about assigning values during a test run.  After the id is generated, your test will look for the ID and assign that value to a variable.  Then instead of a hard-coded value, you will use that variable for the search.

View solution in original post

5 REPLIES 5
Community Hero

Re: Search for dynamic id when creating an item Keywordtest

When the id is created, capture the value and save it in a variable.  Use that variable for the search.

New Contributor

Re: Search for dynamic id when creating an item Keywordtest

Thanks for your comment. My goal is that I can run the test automatically and that I don't have to do any manual action with every run. Does this solution work?

PS. I am just starting with testcomplete ;-)

Community Hero

Re: Search for dynamic id when creating an item Keywordtest

Yes, it will be automatic. 

 

https://support.smartbear.com/testcomplete/docs/keyword-testing/variables.html

 

You want the part in here that talks about assigning values during a test run.  After the id is generated, your test will look for the ID and assign that value to a variable.  Then instead of a hard-coded value, you will use that variable for the search.

View solution in original post

New Contributor

Re: Search for dynamic id when creating an item Keywordtest

Thank you for your help. I will try to use your solution. Thank you.

 

Community Hero

Re: Search for dynamic id when creating an item Keywordtest

You're quite welcome.   Feel free to come back to the thread and ask more if you get stuck.