Forum Discussion
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.
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
- 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
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.
- sonya_m3 years agoSmartBear Alumni (Retired)
This is a great conversation!
Hi Largent803! Were you able to find the final solution to your question? If so, please share it.
- Largent8033 years agoContributor
No I have not found any solution. I have been trying my best to figure out how I can get webelements that show up under a textnode.
My csv will work on part of the required fields but the parts that have textnodes with panel entry requirements that do not populate until
they clicked on do not show up.
Basically, I think I need to understand how to get a in between the click on the textnode and the populated data.
Here is how it looks.
textnode13 is blank I click on it.
Then the what looks like menu options appear
I believe they are webelements with the names or departments
So when I click on one it shows up as paneljohndoe
There could be multiple names or departments this applies to.
- AlexKaras3 years agoChampion Level 3
Hi,
> I need to understand how to get a in between the click on the textnode and the populated data.
You need to investigate your application using Object Browser / Object Spy and figure-out:
-- how to identify initial textnode;
-- how to identify the element (panel) that appears after textnode has been clicked;
-- how to identify data elements that panel is populated with;
-- How to identify the moment when data population is over.
With the above info at your hands, your test code should do the following:
-- Click the text node;
-- Wait until the panel appears on the screen;
-- Wait until the panel is populated with data;
-- Locate the data that should be clicked (defined name, random number, etc.);
-- Click data item.
Does this help?
- Largent8033 years agoContributor
I spoke with my developer and we do not name the our information in our website. This is apparently being named by the TestComplete product.
Here is the information that I found using the object spy.
Sys.Browser("edge").Page(FindElement("//div[6]/div[contains(@class, 'ant-select-item-option-content')]")
FindElement("//div[6]/div[contains(@class, 'ant-select-item-option-content')]")
I took the element name from the name property.
How would be a good way to generate the right kind of script for a csv file that I will be using.
Related Content
- 4 years agosravan
- 11 years agoSoapRookie
- 5 years agomithunpal2
- 7 years agoMKV
Recent Discussions
- 10 hours agojstaehlin
- 2 days agoAivanitskiy