Ask a Question

Script to verify DB Table workbook

SOLVED
Larry_M
New Contributor

Script to verify DB Table workbook

Hello,

 

I'd like to verify that the DB Table project variables, of type Excel, are actually present on the file system. If a file is not present, I'm going to provide a friendly error message in the log and terminate the test.

 

I have a script that iterates over the project variables and checks for type 'DB Table'. I'm stuck trying to determine if the variable is for an Excel file and if it is, the workbook path + filename. In the project's Temporary Variables tab, the column labeled "Default Value" contains the data I want but the Project.Variables.GetVariableDefaultValue() method only seems to return a ColumnCount value, unfortunately.

Any pointers to TC API docs or examples is greatly appreciated.

 

Thanks in advance,

Larry

1 ACCEPTED SOLUTION

Accepted Solutions
Marsha_R
Community Hero

Re: Script to verify DB Table workbook

If the method is not working like these examples

https://support.smartbear.com/testcomplete/docs/reference/program-objects/variables/getvariabledefau...

 

then you should contact Support directly

https://support.smartbear.com/testcomplete/message


Marsha_R
[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

View solution in original post

1 REPLY 1
Marsha_R
Community Hero

Re: Script to verify DB Table workbook

If the method is not working like these examples

https://support.smartbear.com/testcomplete/docs/reference/program-objects/variables/getvariabledefau...

 

then you should contact Support directly

https://support.smartbear.com/testcomplete/message


Marsha_R
[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

View solution in original post

cancel
Showing results for 
Search instead for 
Did you mean: