Brwoser Automation with File Dialog Box

I have this activity where i need to type the file name into a file open dialog on my browser

sometimes it fails sometimes able to type the file into the file path field.
what should i do so that it can consistently type into the field

i get this error every now and then: Invalid Field

subsequently i have an activity that waits for the pop up to disappear and that also is not working consistently

I have set it to wait until the import button to disappear. I also tried other controls.

if i choose an element instead of use focused element, i am also not able to make it work either, getting this error.

hey @Rommel

I see you specified the ‘Delay between keypresses, ms’ as 1 ms, you can try to change it to a higher number because it could be that the window is not able to recognize all the keypresses within short time. You can specify 100 as a value here and try to decrease to a lower number if it works fine.

Regarding the ‘Wait for vanishing’ activity - probably the element has already vanished before the activity started, or the element is always there (from the perspective of the webpage content). You can check it with the ‘Element found?’ activity before and after the ‘Wait for vanishing’ block to understand the behaviour of the element on the page.

If you receive ‘No element were found according to your selection…’ error, it means that with the selected attributes (you can find them once clicking on the element on the ‘Elements’ tab or in the Desktop Picker) the element could not be found. So it worths checking if you can turn off some attributes in the element so it would be found in all of cases.

I suggest you going through our courses in the Academy. Especially, the ‘RPA Developer’ course and the ‘Interface Elements Identification’ workshop which describe the work with Desktop Picker.

thank you for your reply. I think the problem is that the file dialog looses focus. I tried the click element to activate the file dialog but it is not working either.

hey @Rommel

The focus matters only if you are using the ‘Use focused element’ parameter for the activity. Once the ‘Use focused element’ checkbox is checked, the element is not used anymore for the activity. You can see it visually as an element turns to the grey color.

If you deactivate it and set a correct element (as described in the courses above), the clicking on the element to focus on it is not required and the value would be typed into the required element (no matter which element was in the focus before).