Ask a Question

Setting the value of a non fixed position variable

SOLVED
golnar
New Contributor

Setting the value of a non fixed position variable

I have to create a test for a  report page,  we can set the section name,like Advising Load, start year, like 2012, and end year, like 2014,and see all the actvities for that section, during the start year and end year. The result will be in a table, that columns are different semers, like spring 2011, all 2011, .. and rows shows the number of activity in each term, and also the totall number of the selected activity during the start and end year. I have to record the value of  totall. But after recording a test, if I change the start and end year, and run the test, since the postion of totall value, will change,  my recorded test can not find the totall value.

Is there anyway to fix this problem?
Golnar
1 ACCEPTED SOLUTION

Accepted Solutions
TanyaYatskovska
Community Manager

RE: Setting the value of a non fixed position variable

Hi Golnar,

 


It's quite difficult to suggest something without seeing your recorded tests or your tested app. 


If you are using Name Mapping in your test, you need to carefully map the objects, and choose mapping criteria that won't change from run to run, or the values that you can control by changing the project variables.


 


Anyway, we need more information to tell you anything for sure.

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

3 REPLIES 3
TanyaYatskovska
Community Manager

RE: Setting the value of a non fixed position variable

Hi Golnar,

 


It's quite difficult to suggest something without seeing your recorded tests or your tested app. 


If you are using Name Mapping in your test, you need to carefully map the objects, and choose mapping criteria that won't change from run to run, or the values that you can control by changing the project variables.


 


Anyway, we need more information to tell you anything for sure.

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

golnar
New Contributor

RE: Setting the value of a non fixed position variable

I need the value which I have shown in my pictures in red box, as you can see by chnaging the term, the postion of that table cell changes, so even if I carete a Property chekponi for that cell in my first picture, and run the test, but change the term and make it like second picture, it will give me error.
Golnar
TanyaYatskovska
Community Manager

RE: Setting the value of a non fixed position variable

Hi Golnar,

 


Thanks for the clarification. 


Actually, the algorithm can look like this:


1. You obtain the index of the Total column by iterating through all columns.


2. The last row of the table will always show the Total value.


3. When you know the column index and the row line, you can get the value of the needed column.


 


I recommend that you explore the table in TestComplete's Object Browser. To see all available properties, make sure that you are using the Advanced View mode, and showing hidden properties is allowed in TestComplete. Please refer to the "Basic and Advanced View Modes" article for details.


 

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: