Telerik Forums
Testing Framework Forum
3 answers
93 views

<Hello,

 

I have a ASP.net project that uses also RadControls from Teletik.

I need to create an Automated GUI Test project that will be able to recognize both Telerik and simple HTML controls that ASP creates.

 

Please recommend a solution to create a Hybrid Test project that integrates both

“VS Test Project” (VS2010 default) and “VSUnit” (from Telerik WebAii Testing Framework)

For using in Automated GUI tests.

 

Best Regards.>

Cody
Telerik team
 answered on 02 Apr 2012
2 answers
150 views
Hello,

When I debug my tests I cannot see the value of various variables at runtime - I get a cryptic message:

"Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation."

I have this piece of code I'm testing:

foreach (TreeViewItem item in items)
            {
                //Find an item by its text content and expand the node
                if (item.Text == "TextContent")
                {
                    ToggleButton button = item.Find.ByType<ToggleButton>();
                    button.User.Click();
                }
            }

I set a break point on the if statement. I enter into debug mode, it hits my breakpoint and I hover over the item.Text but get that message described above.

The other reason I ask is that this test if failing - not sure if I need to replace the string "TextContent" with a value from the control I'm working with or if this is the actual condition I'm testing for - I took this code from another Telerik forum question on Tree controls that I have to test... so a bit unclear on that... I basically want to trigger a user selection on an element in a TreeView - "click" the "drop down arrow" next to an element in a TreeView. 


Any help on either of these two issues (or both) is appreciated.

Thanks in advance,

J

Jess
Top achievements
Rank 1
 answered on 29 Mar 2012
23 answers
391 views
I have the following code in an NUnit test:

var settings = new Settings {
    Web = new Settings.WebSettings {
        Browser = BrowserExecutionType.Chrome,
        BaseUrl = "http://localhost:19736/",
  EnableSilverlight = true
    }
};
 
var manager = new Manager(settings);
manager.Start();
manager.LaunchNewBrowser();
manager.ActiveBrowser.NavigateTo("/Default.htm");
var app = manager.ActiveBrowser.SilverlightApps()[0];

The test runs (using resharper runner), and a browser opens (saying "Preparing browser for automation..."). I get an timeout:

Uncategorized: DialogMonitor.Start() : Using: ArtOfTest.WebAii, Version=2011.1.712.0, Culture=neutral, PublicKeyToken=4fd5f65be123776c
Uncategorized: DialogMonitor.Start() : OS: Microsoft Windows NT 6.1.7601 Service Pack 1
DialogPlayback: Manager.SetupDialogMonitoring() : Beginning monitoring for dialogs from the set {}.
UIAutomation: UIAutomationWindowMonitor.get_Instance() : Added a(n) WindowPatternIdentifiers.WindowOpenedProperty handler on element System.Windows.Automation.AutomationElement scope Descendants.
Framework: DialogMonitor.Start() : The current ActiveBrowser is either invisible or disconnected.
DialogPlayback: UIAutomationWindowMonitor.HandleAutomationEvent() : New window detected, but not considered a dialog (Text = "WebUI - Google Chrome", ClassName = "Chrome_WidgetWin_0").
-> error: Wait for condition has timed out

Now I switch to Internet explorer browser, I get a blank IE window and:

Uncategorized: DialogMonitor.Start() : Using: ArtOfTest.WebAii, Version=2011.1.712.0, Culture=neutral, PublicKeyToken=4fd5f65be123776c
Uncategorized: DialogMonitor.Start() : OS: Microsoft Windows NT 6.1.7601 Service Pack 1
DialogPlayback: Manager.SetupDialogMonitoring() : Beginning monitoring for dialogs from the set {}.
UIAutomation: UIAutomationWindowMonitor.get_Instance() : Added a(n) WindowPatternIdentifiers.WindowOpenedProperty handler on element System.Windows.Automation.AutomationElement scope Descendants.
Framework: DialogMonitor.Start() : The current ActiveBrowser is either invisible or disconnected.
Framework: InternetExplorerActions.LaunchNewBrowserInstance() : Process launched (ID=4848, Path="C:\Program Files (x86)\Internet Explorer\iexplore.exe", Arguments="-nomerge about:blank").
Framework: Manager.LaunchNewBrowser() : Attempting to attach on IE frame (HWND=4263410)...
Error: [unknown]() : Unable to open key HKLM\SOFTWARE\Telerik
-> error: Exception thrown attempting to launch Internet Explorer. Please make sure Internet Explorer is properly installed and you are able to launch it.

Using Firefox:

Uncategorized: DialogMonitor.Start() : Using: ArtOfTest.WebAii, Version=2011.1.712.0, Culture=neutral, PublicKeyToken=4fd5f65be123776c
Uncategorized: DialogMonitor.Start() : OS: Microsoft Windows NT 6.1.7601 Service Pack 1
DialogPlayback: Manager.SetupDialogMonitoring() : Beginning monitoring for dialogs from the set {}.
UIAutomation: UIAutomationWindowMonitor.get_Instance() : Added a(n) WindowPatternIdentifiers.WindowOpenedProperty handler on element System.Windows.Automation.AutomationElement scope Descendants.
Framework: DialogMonitor.Start() : The current ActiveBrowser is either invisible or disconnected.
Framework: FireFoxActions.FindFireFoxInstallation() : Valid Firefox 4.0.0.1 installation found at "C:\Program Files (x86)\Mozilla Firefox\firefox.exe".
-> error: Wait for condition has timed out

What am I doing wrong? I've tried installing the test framework again

Thanks,
Jon


Cody
Telerik team
 answered on 26 Mar 2012
1 answer
130 views

We use WebAii on a small team for our (HTML) website automation. After recently upgrading from version 2010.3.1421.0 to 2011.2.1305.0 and having a mostly issue-free experience, we have run into a blocking issue for one person on our team. The new version is having trouble communicating with the browser after it launches and the page loads -- this is only on a single tester's machine. Other testers run his same code with the same build and it works without issue. If he changes his references to point back at the old version, the issue does not happen.

When I trace it as far as I can, we make a call into the Click() method on a link element and 5 minutes later the below exception comes back. Are there any known issues that could cause the following exception?

ExecuteCommand failed!
BrowserCommand (Type:'Action',Info:'NotSet',Action:'Click',Target:'ElementId (tagName: 'a',occurrenceIndex: '10')',Data:'',ClientId:'Client_6ca9905c-e6c3-418c-a61f-f0cc631792fd',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'False',Response:'')
InnerException: System.IO.IOException: Pipe is broken.
at System.IO.Pipes.PipeStream.WinIOError(Int32 errorCode)
at System.IO.Pipes.PipeStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.Pipes.PipeStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at ArtOfTest.WebAii.Messaging.Process.PipeCommunication.WriteCommandToPipe(PipeCommand command, PipeStream pipe, Boolean waitForDrain)
at ArtOfTest.WebAii.Messaging.Process.BrowserRemoted.ProcessBrowserRequest(BrowserCommand command, String requestId)
at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)

The machine is Windows Server 2008 R2 with IE9 installed; we all run the same versions of Windows, IE, and Visual Studio. There were no code changes associated with the switch to the new version that we had to revert, so nothing in our stack has changed.

Let me know if there is a way to collect more detailed logs for investigating this issue.

Regards,
Nick

Cody
Telerik team
 answered on 23 Mar 2012
3 answers
97 views
After installing latest release, user.Click() doesn't work on silverlight app in browser. I have turned on anotator ant it shows that it clicks in right place. Can anyone help me?
Ivaylo
Telerik team
 answered on 22 Mar 2012
7 answers
347 views
Hey all,

I have another problem with my deployment of my WebAii.  It seems I've lost control of my mouse (and keyboard) events.  I can see the Annotation telling me that it's clicking the element on my screen, but the click isn't respected.

Any ideas as to what can be going wrong?

I've tried a few suggestions based on my research:
manager.Desktop.Mouse.Click(MouseClickType.LeftClick, System.Drawing.Rectangle.Round(element.GetScreenRectangle()));
element.User.Click(MouseClickType.LeftDown);
Thread.Sleep(50);
element.User.Click(MouseClickType.LeftUp);

I always see the annotation telling me it's being clicked, and it's on the correct element, but again, nothing happens.
Asta
Top achievements
Rank 1
 answered on 21 Mar 2012
5 answers
111 views
I have a 3rd party DataGrid (ComponentOne) that I need to extract the values of it's cells using the Test Framework. Not sure how to go about it. I'm somewhat new to the Test Framework so bear with me. I have used the FrameworkElement before and have used AutomationProperty to get a field off a 3rd party control before but am not sure how to work it with the DataGrid as it returns a Collection that I want to iterate over and get values off the individual cells. They're text cells so they're not holding anything fancy. 

Thanks!!

Anthony
Telerik team
 answered on 21 Mar 2012
12 answers
690 views
Currently using a while loop to check for a variable to not be null and using thread.sleep(250) to wait after checking if it is.  Cannot find a better way to do this, does anyone have any ideas?

[CodedStep(@"Find and click on course link")]
  public void FindAndClickOnCourseLink()
  {
                  string textContent = ((string)(System.Convert.ChangeType(Data["CourseName"], typeof(string))));       
        
                  HtmlAnchor expectedLink = null;
       
                  var attempts = 0;
       
                  while (expectedLink == null)
                  {
                      var rows = Find
                          .ById("activitiesTable")
                          .As<HtmlTable>()
                          .AllRows;
       
                      expectedLink = rows
                          .Select(row => row.Cells[0].Find.AllByContent<HtmlAnchor>(textContent).FirstOrDefault())
                          .Where(a => a != null)
                          .FirstOrDefault();
       
                      attempts++;
                       
                      //TODO: This is not very elegant but it works, needs something better.
 
                      if (attempts > 20)
                      {
                          break;
                      }
       
                      System.Threading.Thread.Sleep(250);
                  }
       
                  expectedLink.Click();
              }
  }
Cody
Telerik team
 answered on 20 Mar 2012
1 answer
95 views
i have a recorded test for Sliverlight application (clicking by  menu item ,surfing on sub-menu ).time after time application shows modal dialog window with button "Save" and "Discard" , for example, there is autosaving or data was changed by another user.And test is stucking on this stage, application is waiting for confirmation.how i can close showing dialog windows after every step, or clicking "SAve" at this dialog?
Anthony
Telerik team
 answered on 20 Mar 2012
1 answer
109 views
i want to easily loop all test , 120 steps. drag and drop 120 steps on loop step is not so easy, and often order of steps occaionally changing into loop (maybe, hand of tremoring once) .how i can perform loop correct? in code manually, for example?
Anthony
Telerik team
 answered on 20 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?