Ask a Question

Using a excel spreadsheet

Stevan
Contributor

Using a excel spreadsheet

is there a way I can have values from a excel spreadsheet, and have them entered automatically when using test complete based on what is in the excel spreadsheet?

12 REPLIES 12
Marsha_R
Community Hero

Yes, there is.  Here's how it works:

https://support.smartbear.com/testcomplete/docs/testing-with/working-with-external-data-sources/exce...


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
AlexKaras
Community Hero

Also, consider Excel object provided by TestComplete.

 

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
================================

Well, I got it to somewhat work, but it only puts in the last word from excel. 

 

Excel reads -  THIS IS A EXCEL TEST. When I run the test, all it puts in the field from excel it the word TEST.

 

Why is it not reading the whole text from excel?

 

 

 

Let's see a screenshot of the code you're using.  Hard to tell what's going on otherwise.


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

Here is my test 

 

Stevan_0-1616091016014.png

 

Right after your Excel-Read Value, do a Log.Message and use the LastOperationResult option that's in this example.  Run the test again and it will put the value to the test log so we can see it.

 

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


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

Does this look correct -  I ran it , but not sure how to read the log file. 

 

Stevan_0-1616160655145.png

 

The log appears when your test has finished running.  I expect to see a line in there that has your Excel value in it.

 

https://support.smartbear.com/testcomplete/docs/testing-with/log/detailed/index.html

 

Marsha_R_0-1616166472202.png

 


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

My test fails after reading the excel and I get the following -- 

 

Stevan_0-1616520817012.png

 

cancel
Showing results for 
Search instead for 
Did you mean: