28-07-21 01:55 PM
What I'm trying to accomplish is to upload a file to google drive via Chrome.
I managed to map the element using the Browser Mode (the button "New" in the drive folder I want to upload to) but when I add the Navigate, the Action "Click" does not work at all. I run it and only thing it does is highlighting the button but not clicking on it (when you click on it, it displays the additional options for your upload)
Any solution or steps to achieve that? or what attributes I need in the app modeler?
I already tried adding additional actions like "Focus" and "Global send keys" but same result 😕
Using BP V6.5 and Chrome ext 6.10
28-07-21 06:22 PM
29-07-21 07:37 AM
Hi Hector,
This is a tricky one, and a classic example of the common traps developers fall into.
To get this to work, you must first make sure you are onto the right element. Blue Prism will likely give you a DIV element with class uw8t2. This DIV in fact only handles the presentation layer of the button, e.g. register your click and display the button click animation to you. But the actual button that triggers the on page event to display the menu is its parent element, i.e. the button element. See the HTML snippet below using Chrome developer mode for your reference:
You can use either XPath or absolute Web Path to get to this button element. For the latter, use the DIV element with uw8t2 class, deselect all attributes except for Web Path, and set its value to
/HTML[1]/BODY[1]/DIV[3]/DIV[1]/DIV[1]/DIV[1]/DIV[1]/DIV[1]/DIV[2]/DIV[1]/DIV[1]/BUTTON[1], i.e. removing the trailing /DIV[2]. This should allow you to spy this element.
This is the first step, the 2nd step involves the use of a single Navigate stage with 3 steps, 1) Activate Application on the Chrome window spied using win32 mode, 2) perform Focus on the button element, 3) use Global Send Key to send a single SPACE key to the button element, i.e. set the Text attribute to " ". This should trigger the menu expansion.
An easy way out involves the use of UIA mode on this button. You will not have the complexity in working out which layer you must select, as there only exists one such MenuItem you can select under UIA. Neither do you need to use a set of steps to trigger this behaviour. A simple "Click" should suffice. The only drawback is the performance of UIA mode. But it is a much simpler solution to develop.
I will leave you to decide on the best way to achieve this.
Hope this helps.
04-09-21 01:35 PM
25-05-22 07:54 PM
25-05-22 11:48 PM