Reputation: 1
Why is RFT not recognizing the objects I have on a windows Print dialog.Included are few screen shots.
TestObject[] to ; IWindow activeWindow = RationalTestScript.getScreen().getActiveWindow(); System.out.println("Class of active window is "+activeWindow.getCLass()): // returns #32770
ScreenTestObject root = RootTestObject.getScreenTestObject();
Apparantly I can't post pictures. here is the link for print window and print button properties screenshot http://www.flickr.com/photos/24358027@N07/12977082214/in/set-72157641973533994 ...resolutions is horrible, I can type all the information if anyone needs it. Sorry and Thanks in advance.
Upvotes: 0
Views: 961
Reputation: 1
Update : I did a workaround for this, using tab to navigate. Once Tab is on the button, I input Enter. So it's not a work stoppage issue anymore, but I do need to figure out the right way to do it. Thanks
Upvotes: 0
Reputation: 30
Try The below Code snippet. I tried launching the print dialog from notepad and ran below script to find the print button and click it.Hope it helps.
//Find the Print button
TestObject[] to = find(atDescendant(".class",".Pushbutton",".text","Print"),true);
System.out.println(to.length);
//If you are sure you have just one print button on screen.
if(to.length==1)
((GuiTestObject) to[0]).click();
//Else traverse through the found object and compare the properties of the button you want to click
Upvotes: 0