AutoIt3 find control handle not shown with AU3Info - autoit

Windows 10 SciTE 3.6.6
I have a window with a toolbar that contains a drop down that I am trying to get a value from but I am unable to find the window handle
The menu and item looks like this
I need to wait for a process to finish (but nothing is busy so waiting for a window does not seem to help). I know for sure that the process is finished if this drop down contains a 1, it will be blank while the process is running. I could also check if a sub menu item under Documents is enabled, but I have not been able to find a handle to the menu either.
When I drag the selector from AU3Info over the item outlines the main window and all values in the Control tab are blank

Related

Items in a List are not visible(Julia, Gtk.jl)?

I have a Window with some widgets. This window is already visible. Then I create a new List and push it into this window. There I have a problem: the names of columns are displayed, but the rows itself not. Sometimes it works correctly, everything is displayed (the rows), sometimes not, but have to. BUT! When i hide the window and open it agan the rows appears.
May be you have any ideas about that or has someone encountered this?
Gtk (the underling library) refreshes its windows under two circumstances: when a window's outline is changed on screen and when the user tells it to refresh the widow. Gtk.jl, however, does not itself tell the Gtk package to refresh when you change the contents of the listing.
See also: GTK+ - Refresh a scrolledwindow
So you do need to refresh the listing window yourself, and hiding and showing the window with each change in the listing is quick enough with Gtk for that to be fine as a solution unless you are doing hundreds of such changes, in which case you might want to only refresh the window after the changes complete.

Automated testing with Robot framework : RE Switching beetween windows that open on the same browser

Following the question : Automated testing with Robot framework : Switching beetween windows that open on the same browser a second issue arises.
How do I make it stay on the new tab if the original and the new tab have the same title.
I click the element, a new tab opens, then it switches to the original tab.
If I take out the Switch Window keyword, it stays on the new tab but it doesn't find the next element, I imagine because it is looking in the original tab.
Click Element //*[#id="id1"]
Sleep 3 seconds
Switch Window TAb 2
Wait Until Page Contains Element //*[#id="id2"]
Click Element //*[#id="id3"]
Sleep 20 seconds
Is it possible to solve this ?
You can try using window handles and switch to the particular tab
Identify and switch to first window
#{list1} get window handles
Switch Window ${list1}[1] -- this will switch to the latest tab opened

PyQt4 (QTabWidget) how to change position of a Tab Page

I am writing an application with PyQt and QT4. I am using a QTabWidget and have set my Tabs to closable and have connected the tabCloseRequsted signal to a method.
self.ui.tabWidget.tabCloseRequested.connect(self.onTabClose)
def onTabClose(self,index):
self.ui.tabWidget.removeTab(index)
This works fine as long as I only close the last Tab Page but if have say 5 Tabs open and close the second Tab the 3rd, 4th and 5th Tab also close. I suppose the way to work around this is to move the tab I want to close to the end so it has the highest index.
One other thing however. Users can create tabs, so when one is closed I don't know if there are one, two or ten tabs open.
How do I move a tab page? or even better is there a better way to close a Tab page?
OK, I found the problem my self. I had put the self.ui.tabWidget.tabCloseRequested.connect(self.onTabClose) in the same method as that which creates new tabs. This meant that if 5 tabs were created, then when one was closed the tabCloseReqested fired 5 times. By putting this connect statement in the init of my class like I should have done it is only defined once and only fires once when a tab is closed.

Show alert if moving on without saving in Flex?

Functionnaly :
On one of my components of my application, I have an editing/lock system. When a user starts editing, he locks the file so other users cannot edit it.
Problem scenario : When the user activates "edition mode" and leaves screen, I would like to show a alert with two options : save changes, or discard changes.
There are different ways to exit screen :
There is a List on the left side containing other possible editabel data. A click changes the data in my component.
There is a menubar on top leading to other screens.
The edition component is embedded in a Tab navigator. When changing tabs, the alert has to show.
Closing browser.
Do I have to catch all of these events and plug at all those places?
Is there any kind of focusout mecanism?
The answer to the first question is: YES.
You need to watch all possible exit events that could harm the currently edited data.
Well, the problem is now how to manage this properly. Using an MVC framework you would trigger the appropriate commands from your components:
CHANGE_LIST_ITEM (new item)
CHANGE_TAB (new tab)
CHANGE_SCREEN (new screen)
Each command then checks if the currently edited tab has been saved or not. If not, it displays the Alert. Else, if there are no changes, it allows the list, the screen chooser and the tab bar to continue.
So your components (list, screens, tabs) need to implement some kind of rollback or preventDefault mechanism. Generally, changing their state must be allowed by a central validator (in MVC the command).
In the case of the list: I would suggest that the list is not selectable by mouse click but only programmatically. You set a listener on the list item click event. If the command allows setting of a new item it will notify the list. In MVC usually by sending an async message that gets received by the list's mediator. [[And even more correct: The command would set some model properties (e.g. currentListItem) and the model than sends an async message.]]
Edit: For the browser close event, you need to call a JavaScript expert.

Quicker way to attach to the worker process in VS

I'm using VS 2010. And in VS 2010 it's even more painful now to attach to the worker process when you want to test your local IIS site via IIS, not the VS built-in web server.
It's more painful because now when you select the worker process () via the Debug Menu | Attach to Process | w3wp.exe it brings up an additional prompt asking if you're sure you want to do this.
Even before this, attaching to the process in previous versions of VS was just outright painful. I must do this 200 times a day which wastes a lot of my time when it takes 5-10 seconds to click through and do this.
Now if you've got 2 different worker processes going, then I can see a need to choose. But before that, just getting to that attach screen is simply painful.
Anyone know a shortcut or just a quicker way other than the attach to process dialog in order to attach to the worker process in VS?
I don't understand why Microsoft doesn't add a nice toolbar icon or something that jumps you right to that Attach to Dialog screen and even better you could be able to specify only to show worker processes as an option which would save me a hell of a log of time sifting through that list even though it's already alphabetized. I still have to scroll to get to it.
Anyway, it's becoming a huge annoyance now..I'm really tired of the long way to get the attachment going to that process every single time.
Hm, not a great leap over and above what you are doing, but it may ease your workflow. have you taken a look at command customization?
Click Tools -> Customize ... (or Right-click tool bar and select Customize ...)
From Customize dialog, click Commands
Select your target, (I suggest Context menu)
Select your sub target (if Context menu, select Editor Context Menus | Code Window)
Click Add Command
From Add Command dialog, select Debug category
Select Attach to Process... from command list (near top)
Click OK
Click Close
Use your new shortcut!
Hope this helps! :)
ps: if you added Attach to Process... command to Code Window context menu, you should be able to launch the Attach to Process dialog from right clicking anywhere in a code window.
Record a macro while attaching and assign a shortcut for that macro and/or assign a menu item for it.
Steps:
Tools -> Macros ->Record Temporary macro
Attach to w3wp, Click on Ignore, etc
Stop recording the macro
Save it
To add a menu item (say under Debug) Right click on VS's Menu strip -> Customize... ->Commands -> ... Add Command -> Macros.YourMacroNAme(DebugIIS for eg)

Resources