I have a popup window that I am trying to type data into as shown below. After finding then clicking on the the hour glass icon the popup window appears. In automation it appears only briefly. I use and “Use Application/Browser” activity to attempt open the popup by inputing output of the “Click” activity as a UIElement but does not work.
I tried all combinations of input mode for the “Use Application/Browser” and “Type Input” activities but still the popup appears for a split second then disappears followed by error message. I changed all clicks to double
I think it’s unnecessary to input UiElement which is output from Click activity. In addition, it may not be necessary use application browser itself. If you put TypeInto for popup in same container which Click exists, doesn’t it work?
no, same problem. The popup disappears.
However, if I keep pressing the search button and force the popup to keep reappearing, the “type input” activity inputs the data into the input box
To isolate cause, can you try to set Breakpoint at the Click activity, and run debug mode.
Workflow will stop there, then press F11 (step into). If pop-up doesn’t disappear, cause is the following activities. If pop-up disappear immediately, there may be some cause in Click.
SingleClick with HardwareEvent mode is the most similar method as human operation. Is it same result if press F11?
If it also doesn’t work, it might work to call open popup directly or fire event using InjectJSScript as workaround…
If feel the pop up is disppearing because the click is on search or hourglass and then you are using same as use application/browser so the focus shifts back
Instead try to use a hardware event input method and perform a clicka nd check
I will try that today. I am also going to try js by passing an attribute of the button since I am able to find it and then click in js. Or I may try to invoke Python and use beautiful soup or selenium. But I am not sure if either will keep focus on the popup. I am thinking computer vision may ultimately be the best solution but it wasn’t able to set the target last I tried.
the button had no “id” attribute so I wrote the js file like this but had no effect.
function() {
var element = document.querySelector(‘[ng-click=“toggleSearch('case')”]’);
if (element) {
element.selectedIndex = 2;
var evt = new Event(‘change’);
element.dispatchEvent(evt);
} else {
console.log(‘Element not found.’);
}
}