Issue with locating a modal window

Mar 12, 2013 at 3:01 PM
Hi, I was testing CUITe framework today and overall it really seems great, reduced code, simplicity and stuff. However, one thing does not seem to work for me:
in a window, when I click on an icon a modal window pops up, which VS not able to locate:

Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException was unhandled by user code
Message=Unable to find Windows Internet Explorer window with 'Look Up Records - Windows Internet Explorer provided by IBM' in the title.

The title is fine, as if I open the modal window by pasting its url into a new window, it finds it.
Is there any other way I could try to get the modal windows, apart from locating it by title? When I record my steps using Coded UI it works fine. It is in MS dynamics crm.

Thank you for any hints ,
Mar 17, 2013 at 8:38 PM
Edited Mar 18, 2013 at 1:19 AM
Hi Arek,

Can you paste your CUITe unit\integration test code and sample html please?

Are you using an object repository class or dynamically using a CUITe_BrowserWindow?

What is the html\javascript code that opens a new window pop-up?

Thank you.
Mar 25, 2013 at 2:31 PM
Thank you for your reply.

This is a standard ms crm lookup window:


with title look up records:

Image is called when the window is opened.

I tried both with proper windows title:
    public class CountryLookup : CUITe_BrowserWindow
       public new string sWindowTitle = "Look Up Records";

//and then in the main class:
CUITe_BrowserWindow cl = CUITe_BrowserWindow.GetBrowserWindow<CountryLookup>();
To record its controls and title i had to somehow obtain and then copy its url to the Recorder's Address bar, as its address is not visible.
Mar 30, 2013 at 9:11 PM
Hi Arek,

I noticed the error message and the actual window title are in conflict

The error message indicates that the window title "Look Up Records - Windows Internet Explorer provided by IBM" was expected.
The screenshot indicates that the actual window title is "Look Up Records -- Webpage Dialog".

In the screenshot of the html, I am wondering what appears in <head><title>.

I am also wondering what the generated code looks like when the CUITe ObjectRecorder is used to record a simple mouse click on the pop up window.

Maybe you can try to wait for a few seconds until the modal window is completely loaded before you try to find it, ex. Playback.Wait(5000).

Thank you.