How to mouse hover using Blue prism on a web page - mouseover

I am trying to mouse hover a menu option using blue prism. I tried HTML/Win32/AA/Region mode while spying but none of them worked. If I click on that element, I will be navigated to a different page.
Any pointers will help.
Thanks

Not sure if you still need an answer on that as this question is more than month old.
If I understood you correctly, you want to hover mouse pointer over menu and then select one of the options from the drop down list. If so, there might be some options to achieve that without clicking on the menu itself.
If you want to open same link every time you navigate through this website, then you can launch the target URL instead of navigating through the menu.
Some HTML elements doesn't need to be visible to be active, on some websites you can 'click' on menu item without it being presented in form of drop down list. You can try to spy that element and navigate directly to it. If you won't be able to spy it you can search for correct element in application tree (Application Modeller -> Select some element -> click on arrow next to Identify button -> Open Application Navigator). Then you can use Mouse Click on that element via Navigate stage.
I've tried to imitate mouse hover on some website by spying whole browser window with Win32 mode, and then using Drop option in Navigate stage, giving the menu exact coordinates. Seems to be working, you can try this option as well.
You can test how menu reacts on Focus method in Navigate stage, but I wouldn't get my hopes up with this option.
If you share link to the website, then maybe I'll be able to help more.

Related

Customise Mouse Right Button Click Popup menu for Web Browsers like Chrome, Firefox and Edge

Most of the web browses like Chrome, FireFox and Edge provide for Disabling Mouse Right Button Click.
For my Java based web application, I want to customise the Popup menu items from the standard items like cut, copy, paste, print etc and include few more custom Menu Items as required by my web application use.
I did my search on stackoverflow and with other search engines and did not any method to customise the Right Button popup menu.
Can someone help in this regard.

Unable to inspect or click a toolbar button using AutoIt

I have an old app to automate using AutoIt.
My biggest problem is to access a specific button inside a toolbar (like the example message).
When inspecting, the inspector only shows the info of the toolbar, not the individual buttons. I can't inspect a specific element inside it.
How can I tell the script which button should be clicked? Maybe find the tool bar and tell to click button 3, but how? Is it possible like this?
Thanks.
Resolved with the instance number of the button inside the toolbar.
Example: [CLASS:Viewcore_W32; INSTANCE:3]
I have to do some attempts with different indexes until right button is clicked but it works now.
Thanks.

How to switch focus to the Inspector tab in Firefox Web Tools?

A button in a website triggers a popup menu when clicked (only when clicked, and not when hovered over). I want to be able to inspect this popup menu but after I right click it and select "Inspect Element", it disappears so I can no longer inspect it.
When the popup menu is displayed, I can see that an entry for it appears in the HTML in the Inspector tab but when I click the entry, the popup menu disappears an so does the HTML entry.
For cases in which a menu appears when a button is hovered over (not clicked) I would click an entry in the Inspector tab to switch focus to it, then I would just hover over the button and use the arrow keys to navigate to the entry in the Inspector tab. But since this button needs to be clicked, then I lose the focus on the Inspector tab.
I thought this could be solved by switching the focus to the Inspector tab in Firefox's Web Tools without clicking anything.
I've tried using different shortcuts such as Ctrl+Shift+C or Ctrl+Shift+I (opens the Web Tool) but I haven't been able to switch the focus to the the Inspector tab to navigate through the HTML after using these shortcuts.
I've also tried using inspect mode (the button left of the Inspector tab), which lets me inspect anything I click. The problem with this method is that to get to the menu I need to click a button first and inspect mode only inspect the first thing I click. Maybe there's a way to ignore the first click while on inspect mode?
EDIT:
Pressing the TAB key numerous times, sometimes focuses on the Inspector tab. Sometimes it just loops through the elements in the website and never focuses on the Inspector tab. Even so, the times I was able to use TAB to focus on the Inspector tab, the popup menu disappeared after pressing TAB about 20 times so I need a different method that doesn't use the TAB key.
I have a deviantart account so I was able to reproduce the issue you described.
The problem is that the popup that appears on click is hidden when the window is blurred or when the page gets clicked. And because focusing the inspector will always cause the content window to blur, there's no way you could switch over to the inspector while keeping the popup displayed.
So, as #Callahad said in a comment, the only viable option here is to use a breakpoint to force the javascript code to pause at a certain point in time that lets you inspect the popup without having it be closed under you.
Now, the question becomes: what is this point in time, and how can you set a breakpoint there.
When the popup appears: this happens when the edit button's element is clicked. If you could add a breakpoint to this exact line in the debugger panel, then you'd be able to click on the edit button, and step through the code until the popup is shown, and then switch over to the inspector again to inspect it. Unfortunately, the javascript event handler for this is in a onclick attribute on the node, and you can't set a breakpoint there.
When the popup is about to be hidden. This happens on window blur. To set a breakpoint there, you could try and follow these steps:
find the html element in the inspector (that's the element where events added to window are shown),
click on the [ev] icon next to it,
find the "blur" event in the list that appears,
click on the debugger icon next to it, this takes you to the debugger at the right line, hopefully
maybe pretty-print the code if needed, using the {} button in the lower left corner of the debugger
add a breakpoint at the right place in this code
and then just click to show the popup, and then click outside the window, this will pause the javascript execution where you added the breakpoint, which is, just before the popup gets hidden, therefore giving you a chance to switch over to the inspector and inspect the popup before it closes.
The popup also gets hidden on page click, so you could do the same thing by looking at this event.
Another valid approach could be:
Override the code that hides popups! Javascript is dynamic, so you could totally turn this to your advantage. Find the function in the deviantart code that hides popup, and change it.
By quickly looking at what was on the window object in the web console, I got lucky and found: Popup2.hideAll. So if you just run this in the web console: Popup2.hideAll = function(){}, and then open the popup, it will just stay there and never get hidden again until you reload the page. This gives you a good way to inspect it.
Last, one very good way to work with DOM changes like this would be to have the "break on DOM mutations" feature in the devtools. Firebug has this, Chrome devtools too, unfortunately Firefox doesn't yet.
The idea of this feature is simple, in the inspector: right click any node (in this case, the parent element of where the popup would appear in the DOM), select "break on mutation", then click to open the popup. When the popup gets inserted into the DOM, devtools would see this and automatically halt javascript execution.

Rgui - disable right click on plot window?

I've written a routine whereby a user is displayed an image (using grid.raster) and they click on it to define a region of interest (grid.locator).
I added in support for the user to right-click on the plot instead of left-click, which would undo their previously-clicked point.
This works by testing whether grid.locator() returns NULL (from the help file: "If the user did not click mouse button 1, the function (invisibly) returns NULL).
This works fine on Linux, but in Windows using Rgui, right-clicking the plot window brings up a context menu with 'Stop' and 'Continue' and continues waiting for you to click (i.e. the right click is not detected by grid.locator() since it's intercepted for the context menu first).
Is there some way to disable the right click context menu for the plot window in Rgui?
(The user is only going to use Rgui. For the moment I can tell them to use the middle click button to undo instead of right click and this works, but it is moot if they don't have a button with a scroll wheel/middle click button. Alternatively if there's some way I can listen for a keyboard event without having to load a UI package like gtk or tcltk I'm happy for that to happen too).

trying to make an application can attach and detach a tab from window by drag and drop like google chrome web browser?

I'd like to make an application which user can drag and drop tab to make a new window contains
a tab control user holds. What i am looking for is the exact same functionality of Google
Chrome browser for window and Internet explorer 9. Both Applications create a new window if
if user drags and drop a tab out of original window. and vice versa.
How do i do this? Any advice or sample code will be appreciated
It's not a simple task, but if you work through it bit by bit...
Most tab controls will allow you to detect mousedown (and maybe even drag) and when the cursor is moved away from the tab row, you create a new window with a single tab (and maybe a frame depending on what you want).
When they drop, show the rest of the frame as required.
As for moving the content, this depends on your application layout but it can be as simple as changing the container of a control (SetParent()) or the destination of a render.
You can also just drag an "image" of the tab and only create the window when they drop.
Getting any more detail than this is going to be preety much impossible without specifics (and you actually accept an answer).

Resources