This project is read-only.

Can't make it work with Chrome or Firefox

Nov 11, 2013 at 11:47 PM
Edited Nov 11, 2013 at 11:48 PM
Hi there,

I'm not having a lot of luck with this either.
Are there any more details on how to make the CUITe work with other browswers using VS2012 sp3 (Selenium stuff has been added)?
I'm using the CUITe project downloaded from this site.

This is what I'm getting:
Result Message:
Test method Sample_CUITeTestProject.CrossBrowserHtmlControlTests.SetText_OnHtmlEditUsingChrome_Succeeds threw exception:
Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: Could not locate the browser window, window name not specified.

Thanks,
LD
Dec 16, 2013 at 7:52 PM
Hi,

I have been able to use the Selenium API in conjunction with with the CUITe framework.

Once you bring in the necessary Selenium components into your CUITe project solution (You would need a "Thoughtworks.Selenium.Core" reference in your project) then the code is fairly simple.

A sample is below:
        CUITe_BrowserWindow.CurrentBrowser = "safari";            

        IWebDriver driver = new SafariDriver();

        //Inserting an implicit wait to avoid the script timimg out due to browser delay/sync issues//
        driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20));


        driver.Navigate().GoToUrl("https://www.google.com");


        //Entering the User Name//
        driver.FindElement(By.ClassName("x-input-text")).SendKeys("xxxx");
Dec 20, 2013 at 8:38 PM
Hi,

I also faced the problem you have mentioned above when I try the launch a url using the below code and then try to use one of the controls on that url:


BrowserWindow.CurrentBrowser = "chrome";
BrowserWindow wdw = CUITe_BrowserWindow.Launch("http://www.google.com");

Error message - "Could not locate the browser window, window name not specified."

The only way I have got it to work is by using the Selenium API as mentioned in my previous post above.

Regards,
Ankit
Jan 10, 2014 at 8:55 AM
The sample test method from the latest code works for me:
Solution File Name: CUITe (NET4).sln
Project Name: Sample_CUITeTestProject
Source Code File Name: CrossBrowserHtmlControlTests.cs
Source Code File Path: .\Sample_CUITeTestProject (NET4)\CrossBrowserHtmlControlTests.cs
Test Method Name: SetText_OnHtmlEditUsingChrome_Succeeds

Can you paste the complete exception and stack trace of the error?

Thank you.