• Post Reply Bookmark Topic Watch Topic
  • New Topic

UI testing  RSS feed

 
D Preethi
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am trying to write a test class for my UI screens of an application and am hitting with one issue. At one point of time, the application shows multiple windows, and I need to get handle of one of those windows (with a title I know) and click on the OK button in that window.

Is there any way I can get handle to that particular window?


Thanks in advance,
Preethi
 
Rob Spoor
Sheriff
Posts: 20895
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With JNI and the Windows' native call EnumWindows you can, but it's not a pleasant road to take. There's a reason I rewrote the application I used that call in into C#.

If you know the window's location and you can use the Robot class to press on its title bar to activate it.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!