Hi there,
I posted this question in another forum earlier and it was suggested I move it here. I also have more information now, so I can hopefully pinpoint the issue a little better. We have scripts that run against a website, that when a link is clicked, opens a secondary window. We need to be able to access the objects in the second window, take some VP's, then close that window and return to the first. It used to work fine with RFT v. 7.1 and RFT v. 8.1 when we were running previous versions of Internet Explorer. Now that we've upgraded to IE 8, however, it crashes on the second window and we get a message that says:
exception_name = com.rational.test.ft.AmbiguousRecognitionException
exception_message = CRFCN0527E: Found 3 instances of the same test object. This often happens when multiple instances of the application are running.
Details: Looking for BrowserTestObject(Name: browser_htmlBrowser, Map: htmlBrowser).
Is there a setting that we need to change in RFT that will allow us to continue to recognize secondary windows? If anyone else is successfully using RFT against a web-based application in IE 8, that does open up secondary windows, I'd love to hear from you!
Thanks,
Shelley
I don't think there is a setting. What you need to do is find a way to distinguish the second browser window from the first. Usually, the caption property of the browser is the easiest choice, but if the caption is the same on the two windows you could use some other property... possibly the URL?
I agree with pabrams. There is not setting, this has something to do with your Recognition Properties for you BrowserTestObject. What properties do you use for the browser in the object map? If you use Caption as one of the Recognition Properties and the caption displays different in IE6 vs IE7 or IE8 then this would cause issues. For example, I know that IE6 display that caption as "your page name - Microsoft Internet Explorer" and IE7 displays the same page with a caption of "your page name - Windows Internet Explorer". These captions are different.
We have had similar problems and resolved it by anchoring the HTML document object contained in the PopUp window to the Html browser object of the PopUp window. We also had to add another recognition proberty (documentName) to the Html.HtmlBrowser class. This is done in the Configure Object Recognition properties. I know that we had some problem getting the added recognition property to be included when we added the browser object to the script, but I can't remember all the details. I thnk we did a right mouse operation on the object in the object map and selected Update recognition properties.
Do you put this in each script? Or is it something you'd put in the object definition class file? I'm just not quite clear exactly how and where you'd use it.
If you could perhaps include a screenshot, that would be very helpful!!
Thanks so much loserjoe - I appreciate it! However, this site (like so many of IBM's sites) doesn't seem to actually work (or they've hidden it really well). I can't see the attachment. :( Could you possibly email it to me?
shelley.kerr@ifms.gc.ca
I too am having a big issue with this type of scenario.. My issue is that I have a window that pops up a secondary window for user input which is now no longer found now that I have upgraded from 6.x to 8.1.x and From IE 6 to 8.
Just as a side note.. I also tried to use the recorder to see if it would work and it failed as well..
exception_name = com.rational.test.ft.AmbiguousRecognitionException
exception_message = CRFCN0527E: Found 3 instances of the same test object. This often happens when multiple instances of the application are running.
Details: Looking for TextGuiTestObject(Name: text_promptfield, Map: promptfield).
First object: recognition score:0, description: {.id=, .type=text, screenRectangle=java.awt.Rectangle[x=617,y=371,width=155,height=22], .title=, .name=promptfield, .classIndex=0}
Second object: recognition score:0, description: {.id=, .type=text, screenRectangle=java.awt.Rectangle[x=617,y=371,width=155,height=22], .title=, .name=promptfield, .classIndex=0}
.
script_name = popup
script_id = popup.java
simplifiedscript_line_number = 4
simplifiedscript_line = Click promptfield
line_number = 46
exception_stack = at com.rational.test.ft.object.interfaces.GuiTestObject.click(GuiTestObject.java:581)
at popup.testMain(popup.java:46)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:574)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:195)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
at org.eclipse.core.launcher.Main.main(Main.java:30)
Just wanted to give you all an update on this. I'm currently working with IBM to solve this issue. I have tried various differences in configuration (including adding the .documentName property to the HTML.htmlBrowser object), on various different sites, even tried turning off the tabbing functionality in IE 8 (because RFT v. 8 seemed to work fine with IE 6 according to a few people I've asked).
I sent a few scripts to IBM, and they in turn sent one back to me. It works for them, it doesn't work for me. They're suspecting it might be an issue with my machine - I disagree, I believe it's obviously a difference in configuration somewhere - or they're not running the same version of either IE 8 or RFT 8 as I am. But since we're all having this problem, it proves I'm not crazy, and it's not just my set-up that is the issue - so there's hope!
They want to do a remote session to see if they can determine what's going on, but I cannot allow that access to our computers (government), so if any of you would like to work with me on this issue and could possibly grant remote access to IBM, please let me know - send me an email at shelley.kerr@ifms.gc.ca and I'll get you involved in the PMR I've got open.
Hi RFTMate,
Sounds good - I find it rather strange that they can apparently run the scripts on their workstations with no problem. I want to know exactly what their configuration is, etc. but they don't seem to be all that forthcoming with that information.
They haven't asked yet, but I'm going to send them my script that opens a second window and see if they can run it. I already know that I can't run one of theirs, but I do wonder if they can run one of mine - if they can't, then I know there's something definitely different in the configuration of the object recognition...
I will also keep you posted if I learn anything useful.
Hi everyone,
No, I have not yet found a solution to the issue.
We thought we had, when we tried setting IE 8's compatibility view settings to work with all websites (Tools > Compatibility View Settings), but by the next day it wasn't working again, so perhaps it was a fluke.
IBM had me send the registry keys for my IE 8 to them, and apparently made theirs match mine and STILL they could run the scripts fine. I'm guessing it's something in Rational itself that isn't jiving with the browser. I've suggested a couple times that it might be a setting somewhere that I've got set differently than they have (though mine are pretty much the default settings as it was a new install).
So, he wanted me to get back to him by yesterday - (thanks for the reminder, ha ha) - I will talk to him today to see what he can suggest. I'm going to push to have him compare our RFT settings/versions, etc. to see if there is ANY difference (who knows how much they've tweaked their object recognition properties, etc.) or how they're recording the scripts.