Forum Discussion

SB345's avatar
SB345
Occasional Contributor
7 years ago
Solved

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 ...
  • tristaanogre's avatar
    7 years ago

    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