Web Menu Dropdowns Clicks randomly selecting from the menu dropdowns
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Web Menu Dropdowns Clicks randomly selecting from the menu dropdowns
I am attempting to do menu dropdown selections testing. The menu is itself a textnode until it gets populated by the menu option.
When I recorded the original test the menus that I selected populated the menu title with that name.
On a regular basis I will have tests that will have menu options that have various names various menus departments and other menu clicks
fields the drop list is always changing depending on what was selected from a previous menu option. So one menu option
can affect what is in another menu's options.
I need to test these dropdown fields randomly and I will not know what is in the dropdown fields. Is there away to do this within TestComplete.
Or is there a listing of example code that I can add to the unit script?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it something like this?
Dropdown1 options
A,B,C
Dropdown2 options
if dropdown1 = A, dropdown 2 is D,E,F
if dropdown1 = B, dropdown 2 is G,H,I
if dropdown1 = C, dropdown 2 is J,K,L
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It looks like
Source = blank
Then I click on the textnode and the dropdown appears with the various
options in this case Source on possible referrals.
In other menu options there is actual names involved however, they are all textnodes.
Some of the fields do have key clicks which is how you name the item
And comments fields where you can go into detail.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I suggest that you record a test that manually goes through the steps you want to cover, in order to get the framework built. Do this for one or two example sets of data so you can see the pattern of the test. Then you can decide if tables or csv or variables or something else will do what you want with the various data.
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
vg14 Click ... Clicks the 'vg14' control.
textnode Click ... Clicks the 'textnode' control.
panelYYYY Click ... Clicks the 'panelYYY' control.
textboxCenterDealdealname Click ... Clicks the 'textboxCenterDealdealname' control.
textboxCenterDealdealname SetText "A New Deal" Sets the text 'A New Deal' in the 'textboxCenterDealdealname' text editor.
textnode13 Click ... Clicks the 'textnode13' control.
panelXXXXX Click Clicks the 'panelXXXXX' control.
panelBold Click Clicks the 'panelBold' control.
panel47 Click Clicks the 'panel47' control.
textnode2 Click Clicks the 'textnode2' control.
panelZZZZZ Click Clicks the 'panelZZZZ' control.
textnode12 Click Clicks the 'textnode12' control.
panel7 Click Clicks the 'panel7' control.
panel8 Click Clicks the 'panel8' control.
panel8 Keys "WEre going backwards in time" Enters 'WEre going backwards in time' in the 'panel8' object.
panel3 Click Clicks the 'panel3' control.
panel292 Click Clicks the 'panel292' control.
buttonCreateNewDeal ClickButton Clicks the 'buttonCreateNewDeal' button.
vg14 Click Clicks the 'vg14' control.
So you can see I have removed the names involved what all of those panels have multiple names that can change
what I need to do to test them is to set these up so that the system will select the textnode and then randomly select
one of the panel names that shows up once the textnode is selected. I have found a csv wants to select all the items in the
csv file and the problem with that is that I would only want it to select it once and then move on to the next menu option.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try a csv with only one row. Put each data value in its own column, in the order they should be entered. Work with the one row until you get the behavior that you want and then add more rows and try again.
It's okay to work through all your possible data combinations in a sequential order. You won't gain anything by trying to pick the data in a random order.
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So how would you rename the panel so that it shows as blank when its beginning because when I set the manual
test the panel name comes up with the name I selected.
Example
textnode13
panelXXXXX2
The panel name doesn't get populated until it is selected so what I am trying to do is work around that issue.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
It is my guess that you are working not with a real dropdown, but with a set of objects (text field, panel, something else) that is orchestrated by some page script and behaves like dropdown.
If my guess is correct, then your code should work with those objects sequentially. For example:
-- Click text field;
-- Wait until the corresponding panel appears on the screen;
-- Wait until this panel is populated with data;
-- Search for the object that emulates dropdown's list element and which contains required data;
-- Click the found object.
Effectively, the above procedure will emulate selection of some element from real dropdown's list.
/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
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Effectively what you describe is correct.
I have multiple textnode's and the panel becomes populated and visible when a option is selected.
So I need to understand how I can setup the TestComplete so that I can automatically have it randomly pick
a panel option from the textnode drop down list.
Is there a specific way that I need to set it up so that each textnode that I am using can be setup with the panel options?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Text below is my another guess as I did not see any screenshot example of the UI portion been discussed.
Panel's binding to textboxes depends on your application. It might be that every textbox has its own panel that is opened when textbox is clicked. However it might be that the same panel is opened every time when any textbox is clicked. This is something that you need to figure out with the help of either Object Browser or your developers.
> how I can setup the TestComplete so that I can automatically have it randomly pick a panel option
After you got the panel, you need to do the following:
-- Wait until panel is populated with data (available options);
-- Get the number of options;
-- Generate a random number between 1 and number of options;
-- Click corresponding option.
/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
================================
