This project is read-only.

Cross Browser Testing and CUITE

Nov 25, 2013 at 4:39 AM
HI All,

I am going through the link -
https://cuite.codeplex.com/discussions/432231

Iconocop said:
"Please see the sample tests in .\Sample_CUITeTestProject (NET45)\CrossBrowserHtmlControlTests.cs. "

But i can't find a path.
Nov 25, 2013 at 11:06 AM
Hi deepakguna,

Sorry, the path is actually slightly different now.

Please see the class here.

Thank you.
Nov 25, 2013 at 11:39 AM
icnocop

thanks for the reply, but the path doesn't work
Nov 25, 2013 at 11:46 AM
Rami,

The path doesn't work.




Nov 25, 2013 at 12:09 PM
icnocop i found the path from the solution thank you !!
Nov 25, 2013 at 12:13 PM
icnocop

when i try to run on chrome i am getting the following error

{"Could not locate the browser window, window name not specified."}

am i missing any thing? I just built and ran the test --> SetText_OnHtmlEditUsingChrome_Succeeds
Nov 25, 2013 at 1:08 PM
Which version of Visual Studio?

Which version of "Selenium components for Coded UI Cross Browser Testing" extension is installed?

Which version of chrome is installed?

Thank you.
Nov 25, 2013 at 1:33 PM
Visual studio 2012 with sp4

chrome Version 31.0.1650.57 m

chrome driver v2.2

Selenium components from
http://visualstudiogallery.msdn.microsoft.com/11cfc881-f8c9-4f96-b303-a2780156628d

looking forward for your assistance
Nov 26, 2013 at 5:48 AM
Iconcop,


Now i downgraded to Firefox 23

Same thing works fine for IE when i have a function like this
        [TestMethod]
        public void SetText_OnHtmlEditUsingIE_Succeeds()
        {
            SetTextOnHtmlEdit(InternetExplorer.Name);
        }
But it throws exception as noted above -- {"Could not locate the browser window, window name not specified."}

this happens in the following code where it is not able to resolve the window.
CUITe_BrowserWindow window = CUITe_BrowserWindow.Launch("C:\\Cross.html", "test");
your help much appreciated!!!
Nov 26, 2013 at 6:31 AM
One more info,

To check cross browser working i tried the following coded without cuite, works fine in both and chrome.
            BrowserWindow.CurrentBrowser="firefox";
            //BrowserWindow.CurrentBrowser = "chrome";
            BrowserWindow Br= BrowserWindow.Launch(new System.Uri("C:\\Cross.html")); /// this is the simple html as in test project
            Br.DrawHighlight();
            HtmlDiv div = new HtmlDiv(Br);//window.Get<CUITe_HtmlDiv>("id=div1");
            div.SearchProperties.Add("Id", "div1");
            HtmlEdit edt = new HtmlEdit(Br);
            edt.Text = "abc";                        
this confirms that the issue is in CUITE on how we initialize browser.

your help much appreciated!!!
Nov 26, 2013 at 8:12 AM
Hi Icnocop,

Hurray it works when you add name as title
        /// <summary>
        /// Initializes a new instance of the <see cref="CUITe_BrowserWindow"/> class.
        /// </summary>
        /// <param name="title">The title.</param>
        public CUITe_BrowserWindow(string title)
        {
            this.SearchProperties[UITestControl.PropertyNames.ClassName] = GetCurrentBrowser().WindowClassName;
            this.SearchProperties[UITestControl.PropertyNames.Name] = title;//Newly added.
            SetWindowTitle(title);

        }

Can you please confirm if the code worked for you with out adding the following line ,
        this.SearchProperties[UITestControl.PropertyNames.Name] = title;//Newly added.

then we might be over looking and want to know what is the exact issue