Questions tagged [window-handles]

Windows OS is full of windows, even objects inside windows as we know them are also windows. Each window has a handle that is a pointer to the memory in which information about the window is stored.

252 questions
3
votes
3 answers

Get title of window without switching in selenium webdriver

Is there any way to get window title without making any switch in selenium? presently I'm using below code: public boolean switchToWindowByTitle(String title){ String currentWindow = driver.getWindowHandle(); Set availableWindows =…
Jitendra Jangid
  • 93
  • 1
  • 1
  • 8
3
votes
0 answers

Windows creates events on thread shutdown

I am attempting to add handle leak detection to the unit test framework on my code. (Windows 7, x64 VS2010) I basically call GetProcessHandleCount() before and after each unit test. This works fine except when threads are created/destroyed as part…
3
votes
1 answer

SetWindowPos not working for browsers - no MainWindowHandle?

I've been trying to make a simple program in C#, to launch different software, and move it to a specific screen, to be able to automatically set up different windows, on a machine with a total of 12 monitors. Most of these windows is launched in…
Drejer
  • 135
  • 1
  • 13
3
votes
5 answers

GUI Automation testing - Window handle questions

Our company is currently writing a GUI automation testing tool for compact framework applications. We have initially searched many tools but none of them was right for us. By using the tool you can record test-cases and group them together to…
ollifant
  • 8,576
  • 10
  • 35
  • 45
3
votes
1 answer

Get child window handles in C#

I'm starting a process in C# and then sending Windows messages to that process with SendMessage. Usually I send the messages to Process.MainWindowHandle, but in some instances I might need to find a child window handle and send messages there…
James Cadd
  • 12,136
  • 30
  • 85
  • 134
3
votes
2 answers

What programming practices affect the number of window handles?

I'm getting the runtime error "Error creating window handle". From my research, I know this error typically indicates that an application has exceeded Windows' 10,000 handle limit, and I should address the error by making sure handles aren't created…
Todd
  • 339
  • 1
  • 3
  • 11
2
votes
2 answers

CreateFile Returns negative handle

Any ideas why the createfile() function would be returning -1. Handle = CreateFile(filename, &H80000000, 0, 0, 3, &H80, 0) This is run a few times. I was thinking perhaps maybe the file is not being closed properly? EDIT Err.LastllError returns 32.
gberg927
  • 1,636
  • 9
  • 38
  • 51
2
votes
2 answers

How to get the handle of the currently active tab with Selenium and Python

I want do find out what's the handle of the currently active chrome tab with Selenium. I can get all the handles with driver.window_handles and driver.current_window_handle to find out what handle selenium is focused on, but when i now change the…
2
votes
1 answer

Data reset on Selenium tab change

While trying to use the data I get from one tab in the other tab with selenium, it resets the data when the tab changes, so I can't use the data. How can I prevent this? My Code : for link in linkler: driver.get(link) oyunAdi =…
Emre Oz
  • 71
  • 1
  • 8
2
votes
1 answer

How to switch tabs using the expected conditions new_window_is_opened and verify the page title using Selenium and Python

I'm writing a test which goes through multiple pages and then verifies the title is being displayed. Currently my test is at the point where i can click a button and it opens a report. The problem is the report opens up in a new tab so i need my…
2
votes
2 answers

EnumWindows and EnumChildWindows to keep my Treeview updated

I am trying to make a program similar to Winspector Spy. My problem is that I would like my Virtual Treeview to be updated at all times - that is, update it when a window is created, when a window is destroyed, etc. Of course, all external…
Jeff
  • 12,085
  • 12
  • 82
  • 152
2
votes
1 answer

Is there an event when the window handle is destroyed

Since the destruction of a window handle disables the invoke mechanism, I do want to unsubscribe to an background-worker that notifies me. So is there an event that is fired shortly before the window handle of a windows form is closed. ( I have seen…
Mario The Spoon
  • 4,799
  • 1
  • 24
  • 36
2
votes
3 answers

How to switch window handles using Selenium and Python

If you click a link in a Windows program other than a web browser, a pop-up window appears. I want to get the url of this popup window. Pop-up windows will only open in IE. driver =…
2
votes
1 answer

How to get currently active tab index on Chrome via Selenium?

I'm creating app which is half-automated (user is opening tabs (attention) and if he wants to dump one of them he just clicks hot-key). But when user opens to much tabs, I need to know to which one I should switch. How can i get currenttab index.…
GrandMaster
  • 31
  • 1
  • 3
2
votes
1 answer

How to find objects/handles in call stack frame is waiting upon "WaitForMultipleObjects"?

In Frame 2, kernel32!WaitForMultipleObjects+0x19 , win32 API call is waiting on multiple objects/handles. In Windbg, how can we determine those handles for this specific frame? 0:012> k # ChildEBP RetAddr 00 093ffba0 7510285f…
sasha
  • 71
  • 8