Forum Discussion
I did get the system to a point where it was creating the same item multiple times. This maybe off base for this question I managed to create the dataloop but with the csv you suggested however, I have multiple required textnodes and panels with data names in them. My csv has 100 pieces of test data with the in it is there away that needs to be setup for the script to recognize those panels that need to be filled with the data from the csv.
Below is an example of the csv with the title of the item:
Source | Deal Name | Banker | LPA/Credit Analyst | Department | Deal Comments |
SXXXX | Bugs Bunny | Benne Rollins | Whitney Robers | Accounting | New Deals Starting up |
textnode13 Click ... Clicks the 'textnode13' control.
panelAnIndividualName2 Click ... Clicks the 'panelAnIndividualName2' control.
panel31 Click ... Clicks the 'panel31' control.
panel272 Click ... Clicks the 'panel272' control.
Or is there away to make it so my script is set up to receive the random data from the csv in the Source Textnode, Deal Name Textnode, LPA/Credit Analyst Text node, Deparment Text Node and then Deal Comments.
The text nodes all have the panel information in them.
Can you post a screenshot of the page you are trying to fill in with the csv data? It's difficult to tell what you are trying to do from generic object names.
- Marsha_R3 years agoChampion Level 3
You could use a random number generator to pick a value from 1-9 and use that result to pick a value out of your table.
- AlexKaras3 years agoChampion Level 3
Hi,
> they won't name a specific element listing
Slightly extreme, but nevertheless: one will not get either good codebase or test code if relevant efforts were not invested into architecture.
To sum up (assuming that my understanding of your question is correct): you need to identify in reliable and stable manner web elements your test code interacts with. If you are not supported by your developers (i.e. web elements do not have unique and stable identifiers for whatever reason) then you are on your own to find out a way to find those elements. This may be search by element's text, relative search (e.g. all DIVs two level down from current element), OCR, some heuristic (e.g. web element that is next to the right from the current one), etc. Actual implementation depends on your tested application and to provide a good enough suggestion one must have a possibility to investigate your application in the Object Browser.
- Marsha_R3 years agoChampion Level 3
Take a look at this tutorial. I think it will answer your questions.
- Largent8033 years agoContributor
ā Deal Information
Create New Deal
Update
Delete
Clear
Clone Deal
Source:
Select Source of this Deal
* Deal Name:
)
* B:
* Department:
Select the Originating Department
LPA:
All of the fields except the Deal name are drop down fields with a panel that list names of who is in the drop down.
This is what I am going after is to create a csv that will pick out all of the drop down information and populate it with new data.
I can't give out to much information about the application as I because it is proprietary information. The one's with stars are required fields.
- Marsha_R3 years agoChampion Level 3
The easiest way to do it is to record a manual test where you type in those fields. Then take that test and change the spots where you typed in the data to instead read the appropriate field from the .csv file.
https://support.smartbear.com/testcomplete/docs/testing-with/data-driven/retrieving-input.html
- Largent8033 years agoContributor
I am not changing the spot where the information is located I am changing who is using that spot so one day it could
Michael Johnson the next its John Doe.
The only criteria is that the names are in the drop down list that is contained when I select the textnode.
My CSV has those names in it along with all the information for each individual file.
- Marsha_R3 years agoChampion Level 3
No, you don't need to change the spot. When you record a test, you will get something like
NameSpot = 'Bobby'
You change that in the test to be
NameSpot = object name of name column in csv file
Then when you put that code in the loop, it will put the name from the current line in the csv, whatever it is
the .csv file takes the place of you typing it in
- Largent8033 years agoContributor
So if I understand you correctly when I am looking at the script I should change the value to the Var record in the value area? In this case reference Var2 data driven loop.
The recording starts with the following
Item Column Operation Column Value Column Description Column
Is that correct?
- Largent8033 years agoContributor
While I can create a script for the data driven loop it is not mentioning how to make it so that I it will stop trying to
populate all the data in the data loop.
An example I used the Generate Data and created a local table.
I had one column which would have any of 9 different values which I wanted the system just to populate that one
then close.
However, the data driven loop wanted to go back and populate all the different items. I do not want that I want to have one picked and then
close it out the test.
Related Content
- 4 years agosravan
- 11 years agoSoapRookie
- 5 years agomithunpal2
- 7 years agoMKV
Recent Discussions
- 4 hours agoashly