cancel
Showing results for 
Search instead for 
Did you mean: 

Web Application - advice needed with search/drop-down list

RichardLoughins
Level 4
I'm trying to build an action for an object based on a web application, which involves entering values into a search box and extracting results, or alternatively, searching for the value in a drop-down list. Unfortunately I can't seem to automate either method, despite numerous attempts and workarounds. If I enter a value into the search box I need to hit enter otherwise it doesn't register the value. I'm able to get BP to enter the value ok, but no matter what I try, it won't mimic hitting Enter. I've tried using Global send keys but this hasn't had any impact. Can someone offer any advice on what method I should be using to enter the value and then hit 'Enter'? As for the drop-down list, I've never worked with these in BP before and I don't know where to begin with it. I've tried using the HTML Combo Box Type, but to be honest, I'm not sure if I'm using it in the right manner. Can someone outline what I should be doing to capture a drop-down list and extract a value from it? Thanks, Richard
6 REPLIES 6

John__Carter
Staff
Staff
Hi Richard - you might need to ensure the field has focus before you send {ENTER}, it could be that the enter key is not 'hitting'. The write stage does not need to focus a field to work, and sometimes the app is not 'aware' that you have entered anything. Maybe try mouse click into the field, then write, then enter. You could also try using send keys for the value too. Failing that, global send key events is worth a try too.For a combobox you can use a read stage to get the current value or a collection of all items. To select use a navigate stage, and either provide the index of the item you want or the text of the item.

RichardLoughins
Level 4
Hi John - Thanks for taking the time to respond. Unfortunately I tried 'Focus' on the field before but it didn't seem to have any impact. I also tried the mouse click > Write > enter approach (using send key) but this didn't work either 😞 I'll give the combo box method a go and see if this has any impact, although I've noticed even capturing the items in the list is proving a nightmare.

kumaresh_seluka
Level 2
You can spy the search box and use ""Writer"" stage to send the values and spy the ""Search"" image as well and use navigate stage to click center or something. That way you would be able to get the results.

RichardLoughins
Level 4
Hi KumareshSeluka, unfortunately that doesn't work either. When the navigate stage clicks center, it wipes the value from the search box. Thanks for the tip though!

Denis__Dennehy
Level 15
Combo boxes tend to sometimes be difficult to interface with - as they more likely to be bespokely made rather than being a standard component (programmers seem to like to create their own non-standard components). I recommend looking at the section in the Surface Automation training about combo boxes. It is likely that your combo box is waiting for some manual event to work (it could just be a mouse click or an enter keystroke) - so some experimentation may be required. Just to be clear on what you have tried so far to hit the enter key - I would expect it to look like this (as per SA training): Activate Main Window Tiny Wait Global Click in Combo Box to focus the cursor in that element Tiny Wait Global Send Keys to send the enter key which I think is {ENTER} Wait Stage... If that does not work you probably need to also use Global Send keys before the Enter to enter the entire text (rather than just writing the value).

RichardLoughins
Level 4
Thanks Denis, we got it to work a few days ago with exactly the same method as you described. It simply needed an Activate Window.