Dropdown Selection Not Recognized When Using "Select Item"

Skauby

New Member
Hi friends, this forum has been a great help to me in the past and I'm hoping it can be once again.

BP Version: 6.10.1
Browser: Edge Version 91.0.864.48

Issue:
I'm working on a build where I interact with a web application. On this website I make selections in different dropdown menus, and in a few cases when a specific selection is made an additional dropdown menu will appear. I've spied the dropdown in "browser mode", and using the "select item" function I can get the correct value to display as selected in the menu. However, the secondary dropdown does not appear.

For testing purposes I tried Spying with UI instead getting the automation to manually clic the dropdowns and making the selection, that worked in the sense that the secondary dropdown appears, but besides being slow and clunky (which I could live with if absolutely necessary), it came with a whole other issue, when Spying with UI the unique name for the dropdowns is not captured.

Instead I would have to rely on Index to determine which menu to Interact with and since the number of menus on the page are different based on the choices made on previous pages the logic becomes extremely clunky and not 100% accurate.

Question:
Would it be possible to somehow force the website to recognize the selection made by using select item. i.e. sending a script or something like that? If so what would that look like and how would I go about it?

Thankful for any suggestion!
 
HI Skauby,

Its happens in some website where dropdown selection using HTML or UI mode is not proper .
You have to use another trick in which you can do follwoing things
1. Use AA mode to target the dropdown
2. Then when dropdownlist layout is out use use html mode to read the value of items
3. Use global send key {UP} or {DOWN} as per you wanted to move to select the item from dropdown
4. Read one by one like this and at last when as per desired value is read and current selection is same then do global send key as {ENTER}. it will select the item.
 

Skauby

New Member
HI Skauby,

Its happens in some website where dropdown selection using HTML or UI mode is not proper .
You have to use another trick in which you can do follwoing things
1. Use AA mode to target the dropdown
2. Then when dropdownlist layout is out use use html mode to read the value of items
3. Use global send key {UP} or {DOWN} as per you wanted to move to select the item from dropdown
4. Read one by one like this and at last when as per desired value is read and current selection is same then do global send key as {ENTER}. it will select the item.
Thanks for taking the time. I used to use AA when spying internet explorer in BP 6.4. However since moving to 6.10 and Edge browser I no longer get AA spying as an option.
 

Skauby

New Member
If anyone knows if it's possible to activate AA as a spying method please let me know as that would solve this issue.

I'm open to other suggestions as well.
 
Hi Skauby ,

Please find below links , see if some setting can do enable the mode as its problem in chrome as well



 

Skauby

New Member
Hi Skauby ,

Please find below links , see if some setting can do enable the mode as its problem in chrome as well



Thanks, I've looked through it and it seems like I can't spy AA in browser mode, so would need to run th application wizard and chose window mode instead. I'll try something else to aviod that.

Still though, must be some way to execute a java script to get the result.

I was thinking something along the line of two data items:

one with this function
function updateFromValue() { document.getElementsByName('ElementName')[0].value = 'EnterValueHere'; }

and one for calling
updateFromValue();

Got the idea from another forum. Will try it and post here if it works.
 

sahil_raina_91

Active Member
Thanks, I've looked through it and it seems like I can't spy AA in browser mode, so would need to run th application wizard and chose window mode instead. I'll try something else to aviod that.

Still though, must be some way to execute a java script to get the result.

I was thinking something along the line of two data items:

one with this function
function updateFromValue() { document.getElementsByName('ElementName')[0].value = 'EnterValueHere'; }

and one for calling
updateFromValue();

Got the idea from another forum. Will try it and post here if it works.
Were you able to find a resolution to this ?
For such scenarios, where the dropdown selection isn't registered by the webpage, try to send "TAB" key after selecting the item.

Select Item(Browser mode) > Focus Dropdown(Win/AA/UIA) > Send Tab Key (GSK/GSKE)
It has worked for me in past with significant degree of success.
 

pln777

New Member
Hi friends, this forum has been a great help to me in the past and I'm hoping it can be once again.

BP Version: 6.10.1
Browser: Edge Version 91.0.864.48

Issue:
I'm working on a build where I interact with a web application. On this website I make selections in different dropdown menus, and in a few cases when a specific selection is made an additional dropdown menu will appear. I've spied the dropdown in "browser mode", and using the "select item" function I can get the correct value to display as selected in the menu. However, the secondary dropdown does not appear.

For testing purposes I tried Spying with UI instead getting the automation to manually clic the dropdowns and making the selection, that worked in the sense that the secondary dropdown appears, but besides being slow and clunky (which I could live with if absolutely necessary), it came with a whole other issue, when Spying with UI the unique name for the dropdowns is not captured.

Instead I would have to rely on Index to determine which menu to Interact with and since the number of menus on the page are different based on the choices made on previous pages the logic becomes extremely clunky and not 100% accurate.

Question:
Would it be possible to somehow force the website to recognize the selection made by using select item. i.e. sending a script or something like that? If so what would that look like and how would I go about it?

Thankful for any suggestion!
Hai , Hope you found solution
As part of my suggestion is try XPath / CSS Selector which are available from Version 6.8 and accurate and fast
 

suhasdhongade

New Member
1. Spy in Browser Mode
2. Activate window
3. Focus on Dropdown
4. Send Global keys on Dropdown (Yes on Dropdown) like following
"{F4}"&[Dropdown Selection Item Text] &"{ENTER}"
 
Top