Drag and drop a window upwards in sikuli - sikuli

Background:
I am trying to automate a desktop application using sikuli with Java.
When we click on a Browse button in the application, it will open a new window to select destination folder to download some files.
We need to click OK button once the folder is selected.
Problem:
Whenever we click on Browse button, an enlarged window is opened by default in the lab execution machine where the script is running.
Due to this, the OK button is not visible on screen.
We have to move the Browse window upwards in order to make it visible.
I tried using Region.dragDrop() method to move the window upwards.
However, it is not find the destination match which is behind the Browse window.
Please guide me in coming up with a working approach to this problem.

This is an indirect solution to your problem. Since drag/drop and other "visual" actions are usually more flaky and harder to automate, I suggest you use keyboard shortcuts as much as possible. In your case, if the blocking window is opened last, I assume it becomes the active window which means you can minimize it using Win+down combination (assuming you are in Windows).

Related

How to move the "re-frame-10x" window back to the browser tab after being popping out into a new window?

I have been using Clojure, ClojureScript, lein, shadow-cljs, re-frame, reagent, Emacs, and CIDER to work on a Clojure/ClojureScript dynamic web app project.
Usually, I build the project by executing the command cider-jack-in-cljs in Emacs, choosing shadow-cljs, then shadow for REPL type, and, finally, app for the building option.
The application loads in localhost:3005 with a debugging dashboard. Apparently, this UI is called "re-frame-10x":
After clicking on the up-right arrow icon on the top-right:
I managed to pop out the debugging dashboard into a new window in Google Chrome. It was injecting some CSS and hiding a button on the webpage. Hence, I decided to "remove it" by popping-it out.
But, I would like to move it back to the browser tab that has localhost on the address. How to do it?
As suggested by #eugene-pakhomov, it was just closing that window. I must highlight that I had tried that before, the only problem was that there were multiple windows of that type. And all of them need to be closed for the process to work!
Not sure why the program opens multiple windows...

Sikuli opening windows start menu without reason

Im trying to create a script that works on two differents windows simultaneously, but everytime the script clicks, it opens the windows start menu without reason which hides part of my screen and cause FindFailed errors.
What can I do to prevent that ? What causes this issue ?
Clicks with SikuliX are not "simultaneously" but always sequentially one after the other.
So tell a bit more about your setup.
A relevant snippet of your script code might help as well.
Have you tried "run in slow motion", where you can better watch, where the mouse moves and clicks?

How to force a webpage to think that it is in or out focus?

I am trying to build a web app (to learn about WebSockets and adaptive behavior) that polls different social media sites and shows all the latest updates in one place. I want to make the page stop updating while out of focus, and then update again when in focus.
Testing the out of focus behavior has been very difficult, since I have to rely on logs to ensure that my app is working properly, and cannot have the window open in one monitor and work on the code in another monitor.
My question is:
Is there a way to "force" the tab to think that it is in or out of focus, like force element state in DevTools, but for the entire tab.
I am running Chrome on Windows 10. I could not find a way to do this using DevTools, and do not want to setup a whole testing framework just for such a simple thing.
Thank you for your time.
Open the Command Menu.
Run the Emulate a focused page command.
If you create a Live Expression and set the expression to document.hasFocus() you'll see that the page always thinks it's in focus after you run the Emulate a focused page command.

Is it possible to open multiple instances or split view of chrome developer tools tabs?

I want to debug code at the same time as I see what is being sent on the network tab without having to go back and forth between the Network tab and Sources tab. Is there a way to do this as of chrome Version 52.0.2743.82 or Version 54.0.2810.2 canary?
I know that it is possible to log http request in the console which can be visible with other tabs open but I want the actuall networks tab if possible..
Thank you in advance
This is now possible in Chrome 87. Right click Network in the menu and select "Move to bottom"
and it will do this
You can view 'Quick source' while viewing the Network panel (or the other main panels) at the same. This will allow you to view the source and add breakpoints.
However, it's not possible to step through code using the debugging in the split view. Chrome will automatically switch to the Sources tab if you use the shortcuts.
It's also not possible to have an extension running a separate instance of the debugger as the Chrome Debugging Protocol doesn't allow simultaneous clients to be connected.
I will open up a discussion with other Chromium contributors into the feasibility of sharing the debugging controls in the split view. I don't know whether it will or can be done easily. I suspect it's a fair amount of work.
If you would like to set up the split view, as it's useful anyway, go to overflow menu on the right side and select 'More Tools' and then select 'Show console'. This makes sure the panel loads below the main one.
On the left side of the panel that shows, click the overflow menu and select 'Quick source'.
You will now see a small Sources panel.
Since I was referred here from this question, I'll answer here.
In my scenario I need to be able to work on two different source files (under DevTools->Sources) simultaneously, for instance an html and a css file.
My workaround was to work on two separate tabs.
Right click one of them and click 'Open in new tab'.
When the new tab is open press F12 to open DevTools, and dock the two editors side by side (Focus on one and pressing ⊞+→ then leftwards on the other one).
Result:

Don't show run tab after launch in Android Studio

I'm developing apps in Android Studio. But everytime I hit Run button, the Run tab pops up automatically from bottom with messages like Installing com.packagename etc..., Success, Launching
I've already disabled automatic displayin of Android DDMS tab (because I use DDMS from toolbar which opens new window) by editing configurations. But I can't disable this stupid automatic Run tab showing.
Is there any way to do this ?
There is no standard way of achieving this but I found an interesting workaround mentioned below and using the same.
When your run tab is opened, Instead of hiding it using right-top corner button, Drag it till it hides.
Like in picture shown below
Now Run your project run window wont appear, When you want it back click on run button in horizontal bar.
Working perfectly for me .
In case anyone still struggling with this annoying thing, there is a way to disable this annoying popup.
Note: this will remove the run tab altogether.
So basically go to your Run/Debug configuration and Uncheck Activate tool window at the bottom.
This gets rid of the Run tab.