Ask a Question

How To Create A Data File For A Web-Based Application

SOLVED
SB345
Occasional Contributor

How To Create A Data File For A Web-Based Application

Hi,

How do you create a data file for a web-based application, please ? I want to use an xlsx file preferably.

 

Also, how can I click on a particular item several times during a test, and, how do you select different values from a drop-down.

It appears that that the keyword for clicking an item is: "Click", and, selecting different values is: "Click Item".

Please, can you be kind enough to confirm ?

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
tristaanogre
Community Hero

Re: How To Create A Data File For A Web-Based Application

Let's start from the top:

 


@SB345 wrote:

Hi,

How do you create a data file for a web-based application, please ? I want to use an xlsx file preferably.


What are you intending to do with the data file?  How are you going to use it?  What should it contain?

 

Just a guess... but I'm assuming you're coming into TestComplete after using some other tool, is that correct?  Basically, TestComplete allows you to use a large variety of data sources to process within TestComplete, including xlsx.  However, what you do with the file is going to vary depending upon your content.  I'd recommend reading the following as it contains a LOT of information about how to use data to drive tests in TestComplete.  

https://support.smartbear.com/testcomplete/docs/testing-with/data-driven/basic-concepts.html


 


@SB345 wrote:

 

Also, how can I click on a particular item several times during a test, and, how do you select different values from a drop-down.

It appears that that the keyword for clicking an item is: "Click", and, selecting different values is: "Click Item".


Clicking on the same item multiple times is a matter of just calling that item's "Click" method.  Basically, every onscreen item in TestComplete has a set of default methods that can be executed it.  "Click" excutes a single left-hand button mouse click on the object.  Passing paramaters to "Click" allows you to specify a pixel co-ordinate within the object to click on but I recommend executing "Click" with either no parameters specified or using Click(-1, -1) to click in the center of the object.  

 

ClickItem is a method associated with recognized dropdown controls to click on an item in that drop down.  You can send either the index of the item (ClickItem(2)) or a string (ClickItem('Second Item')) to click on that item.

 

Here's my suggestion:

 

Use the "record" feature to record a few actions against your application under test to see how TestComplete interacts with it.  I wouldn't recommend leaving that recording as-is for running regular tests but it's a good start to see how TestComplete interacts with objects.

 

To see ALL the methods and properties available for ALL object types supported by TestComplete, you can start here

 

https://support.smartbear.com/testcomplete/docs/reference/test-objects/controls/index.html


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

3 REPLIES 3
tristaanogre
Community Hero

Re: How To Create A Data File For A Web-Based Application

Let's start from the top:

 


@SB345 wrote:

Hi,

How do you create a data file for a web-based application, please ? I want to use an xlsx file preferably.


What are you intending to do with the data file?  How are you going to use it?  What should it contain?

 

Just a guess... but I'm assuming you're coming into TestComplete after using some other tool, is that correct?  Basically, TestComplete allows you to use a large variety of data sources to process within TestComplete, including xlsx.  However, what you do with the file is going to vary depending upon your content.  I'd recommend reading the following as it contains a LOT of information about how to use data to drive tests in TestComplete.  

https://support.smartbear.com/testcomplete/docs/testing-with/data-driven/basic-concepts.html


 


@SB345 wrote:

 

Also, how can I click on a particular item several times during a test, and, how do you select different values from a drop-down.

It appears that that the keyword for clicking an item is: "Click", and, selecting different values is: "Click Item".


Clicking on the same item multiple times is a matter of just calling that item's "Click" method.  Basically, every onscreen item in TestComplete has a set of default methods that can be executed it.  "Click" excutes a single left-hand button mouse click on the object.  Passing paramaters to "Click" allows you to specify a pixel co-ordinate within the object to click on but I recommend executing "Click" with either no parameters specified or using Click(-1, -1) to click in the center of the object.  

 

ClickItem is a method associated with recognized dropdown controls to click on an item in that drop down.  You can send either the index of the item (ClickItem(2)) or a string (ClickItem('Second Item')) to click on that item.

 

Here's my suggestion:

 

Use the "record" feature to record a few actions against your application under test to see how TestComplete interacts with it.  I wouldn't recommend leaving that recording as-is for running regular tests but it's a good start to see how TestComplete interacts with objects.

 

To see ALL the methods and properties available for ALL object types supported by TestComplete, you can start here

 

https://support.smartbear.com/testcomplete/docs/reference/test-objects/controls/index.html


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
SB345
Occasional Contributor

Re: How To Create A Data File For A Web-Based Application

@tristaanogreMany Thanks for your prompt response. I have been using Selenium WebDriver for some time and I am just learning how to use SmartBear TestComplete. So, you are right regarding me been used to another tool.

It appears that I have more research to do. But, so far I would say that I am enjoying it.

Many Thanks once again.

tristaanogre
Community Hero

Re: How To Create A Data File For A Web-Based Application

Since you are new at TestComplete, you can probably get a good overview of how things work by attending a TestComplete 101 webinar.

https://support.smartbear.com/testcomplete/training/free-training/

 

This will give you the absolute basics of how to do stuff with TestComplete.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
cancel
Showing results for 
Search instead for 
Did you mean: