Telerik Forums
Testing Framework Forum
3 answers
65 views
Hi guys,

Here is what i am trying to achieve using Telerik Test Framework. (My app is built in Silverlight 4) 

I have two questions, 

1)  using the framework i am able to log in into my app and get the hold of some of the controls already in the page
does that mean the silverlight app i am trying to automate has "enableSilverlight = true" ?

2) When i click on search button, the app refreshes and gives the result page (which is the grid in silverlight, user control i suppose)
i get the following exception


Exception thrown during the wait for a condition. Error: Unexpected error while waiting on condition. Error: ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
InError set by the client. Client Error:
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessSilverlightCommand(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)
BrowserCommand (Type:'Silverlight',Info:'NotSet',Action:'NotSet',Target:'ElementId (tagName: 'object',occurrenceIndex: '0')',Data:'{"Method":null,"Property":null,"Reference":null,"Reference2":null,"Type":12,"Value":null}',ClientId:'Client_9849eb3c-9608-402c-995e-11d8b53787d3',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessSilverlightCommand(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)')
InnerException: none.

   at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
   at ArtOfTest.WebAii.Silverlight.SilverlightProxy.ExecuteSLCommand(SilverlightCommand cmd)
   at ArtOfTest.WebAii.Silverlight.SilverlightProxy.GetAllVisualTrees()
   at ArtOfTest.WebAii.Silverlight.SilverlightApp.RefreshVisualTrees()
   at ArtOfTest.WebAii.Silverlight.VisualFind.RefreshRoot()
   at ArtOfTest.WebAii.Silverlight.VisualWait.WaitForExistsByFindInfo(VisualFindInfo findInfo)
   at ArtOfTest.Common.WaitAsync._worker_DoWork[T,V](Object waitParam)


Any help in this regard will help me achieve the deadline.
Thanking you in advance.
 
Boyan Boev
Telerik team
 answered on 14 Mar 2014
8 answers
254 views
Hi,

I am unable to get the LaunchNewBrowser() feature to work (using Chrome or IE).  If I use the default settings for LaunchNewBrowser, I get an error that "Wait for condition has timed out".  If I turn the "wait for condition" off, then I get an error that "Sequence contains no elements".

Here is my sample code:

// Initialize the settings
Settings mySettings = new Settings();

// Set the default browser
mySettings.Web.DefaultBrowser = BrowserType.InternetExplorer;

//mySettings.Web.

// Create the manager object
Manager myManager = new Manager(mySettings);


// Start the manager
myManager.Start();

// Launch an instance of the browser
try
{

// myManager.LaunchNewBrowser(BrowserType.InternetExplorer, false);

myManager.LaunchNewBrowser();

ActiveBrowser.NavigateTo("http://www.google.com");
}
catch (Exception e)
{

}
Cody
Telerik team
 answered on 13 Mar 2014
3 answers
107 views
Hi All,

I have a test which launches window from the existing site , takes some inputs and when you close the window pop up, it returns some values to the original window, which I am verifying. i am using click(true) to close the pop-up, the problem I am running into is with chrome browser, when I try to use browsers collection  to parse the dom of the first site,  to grab some divs , the find expression times out, any help will be much appreciated!!
Boyan Boev
Telerik team
 answered on 13 Mar 2014
6 answers
113 views
I am trying to test my application on Windows 8.1 x64 and I always get a timeout when trying to use the command LaunchNewBrowser to open Internet Explorer 11. Basically it opens the browser window but it sits at the about:blank screen and never goes anywhere until I get the timeout message from my app. The windows 8.1 machine is running on VMWare Workstation and has no extra software installed except from windows update. I installed windows 8.1, installed all critical and recommended updates until nothing was left (multiple reboots). I then installed the same telerik testing framework msi installer that I used on my development machine. I don't even have adobe reader or antivirus or ANYTHING else on this box, it is very clean! The same code runs fine on my windows 7 x64 box and I don't recall doing anything special to get set up. I have been up and down these forums trying everything and here is a summary of what I have done:

-Disabled protected mode for all zones
-Completely disabled UAC
-Disabled the popup blocker
-Added the url I want to visit to trusted sites
-Disabled 3rd party addons
-Repaired the install of Testing Framework using the same installer
-Rebooted multiple times between all of these tests

I was getting so frustrated that I installed chrome, enabled the telerik extension and ran the same test with chrome AND IT WORKED!

Does the newest most updated version of Internet Explorer not work with the testing framework on Windows 8.1? This is such an unadulterated box that I can't believe it doesn't work after all of this. Please help!
Boyan Boev
Telerik team
 answered on 11 Mar 2014
1 answer
84 views
Hello,

I am new to test studio but have some experience in C#  and Visual studio. I created a Webtest.tstest and recorded few steps in it. Then I converted it to the C# code using MSTest framework. I started modularizing the code into several small functions. I am facing few problems here

1. When I add a new step to Webtest.tstest  it is not being directly reflected in the above C# code. Is there any way I can keep them in sync.
2. I have my data defined in excel and ma accessing it in the code using the below code.
Actions.SetText(Pages.x2003FREIGHTERDROPDECKFor.TxtEnquiryFormNameText, Data["Name"].ToString())

But when I do the same in the C# code that is converted using MSTest Framework, I am unable to access the Data object. How do I use the Data here.

Kindly help.

Thanks in advance
Meher

Boyan Boev
Telerik team
 answered on 10 Mar 2014
3 answers
817 views
I am having severe problems with IE caching my tests. I can confirm with fiddler that if I run a certain test and return to the same url it does not hit the server but instead returns data from cache in all versions of IE that I have tested (IE 9, 10, 11). These same tests work as expected in firefox and chrome. This is not a problem with the Telerik Testing Framework but a problem with Internet Explorer. I have found two solutions to this problem:
  1. Enable "Always Refresh from Server" in the IE developer tools menu. This works well and is most likely how I would like to solve this issue but the problem is that this setting does not stick and I have to manually enable it every time a new instance of IE is loaded.
  2. Write random query string values onto the end of all urls to ensure that the url is unique and therefore will not pull from cache. This works well but I consider it to be a hack and therefore I am looking for a more graceful solution if it exists.

So is there any way that I can use the Telerik Testing Framework to enable the "Always Refresh from Server" option in IE? Or maybe there is a way to always enable this option or make it persist across all IE sessions? Any help would be appreciated.

Cody
Telerik team
 answered on 07 Mar 2014
1 answer
79 views
Hi

I have a scenario where I have to verify whether javascript  alert has appeared or not. Based on the alert appearance I have to perform few more checks.
Please let me know how should I verify whether javascript alert has appeared or not?

It would be really helpful if you could provide me a sample code..
Velin Koychev
Telerik team
 answered on 07 Mar 2014
6 answers
173 views
Telerik framework Issues on start and end of test on Connector.InjectCode() to WPF application

Since we upgraded to version 2013.2 1327 from 2013.2 1210, we have had an issue with the framework when we are disposing the Manager. See below for the Telerik log dump we get as soon as we call Manager.Dispose() with the exceptions in Bold. This is the same output even after updating to the latest dev release 2013.2 1417. 

Telerik Log
Uncategorized: Log.WriteLineInternal() : Disposing Application Manager
Framework: BrowserProvisioner.EndService() : Connecting to the provisioning pipe "Pipe.ArtOfTest.WebAii.BrowserProvisioner_1973293258" in order to unblock and eventually terminate it...
Framework: BrowserProvisioner.ServiceThread() : A new client has connected to the provisioning pipe but this will be treated as a termination cue.
Framework: BrowserProvisioner.EndService() : Provisioning pipe connected.
Framework: BrowserProvisioner.EndService() : Provisioning thread terminated.
DialogPlayback: DialogMonitor.Stop() : Dialog monitoring is being halted.
Warning: Manager.RemoveBrowser() : Attempted to remove a client ID "Client_db492fb9-4704-4713-891e-3e1d3e877906" that was not in the list.
Framework: BrowserRemoted.End() : Now aborting the listener thread (TID = 23).
Warning: Manager.RemoveBrowser() : Attempted to remove a client ID "Client_ae726a31-5fb0-45c4-bc1e-18b5a40cc412" that was not in the list.
Framework: BrowserRemoted.End() : Now aborting the listener thread (TID = 6).
Warning: PipeCommunication.SyncPipeRead() : Pipe read broken by thread-abort.
Warning: PipeCommunication.SyncPipeRead() : Pipe read broken by thread-abort.
Warning: Manager.RemoveBrowser() : Attempted to remove a client ID "Client_22e94d19-5633-47cc-bfa4-a65a1c234435" that was not in the list.
Framework: BrowserRemoted.End() : Now aborting the listener thread (TID = 21).
Framework: WpfApplication.Detach() : Process killed (ID=9356, ExitCode=259, Path="C:\Program Files (x86)\McLaren Applied Technologies\ATLAS 10\MAT.ATLAS.exe", Arguments="").
Framework: WpfWindow.Detach() : EXCEPTION! (see below)
     Situation: Exception sending detach command to application window
     Outer Exception Type: System.ArgumentNullException
     Message: Value cannot be null.
          Parameter name: key
     HRESULT: 0x80004003 (Official ID (if app.) = E_POINTER, Error Bit = FAILED, Facility = FACILITY_NULL, Code = 16387)
     Call Stack:
          at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
          at ArtOfTest.WebAii.Messaging.Process.PipeCommunication.GetPipeSync(PipeStream pipe)
          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.Wpf.WpfProxy.DetachApp(Boolean closeWindow)
          at ArtOfTest.WebAii.Wpf.WpfWindow.Detach(Boolean closeWindow)


Warning: Manager.RemoveBrowser() : Attempted to remove a client ID "Client_22e94d19-5633-47cc-bfa4-a65a1c234435" that was not in the list.
Framework: BrowserRemoted.End() : Now aborting the listener thread (TID = 21).
Framework: WpfWindow.Detach() : EXCEPTION! (see below)
     Situation: Exception sending detach command to application window
     Outer Exception Type: System.ArgumentNullException
     Message: Value cannot be null.
          Parameter name: key
     HRESULT: 0x80004003 (Official ID (if app.) = E_POINTER, Error Bit = FAILED, Facility = FACILITY_NULL, Code = 16387)
     Call Stack:
          at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
          at ArtOfTest.WebAii.Messaging.Process.PipeCommunication.GetPipeSync(PipeStream pipe)
          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.Wpf.WpfProxy.DetachApp(Boolean closeWindow)
          at ArtOfTest.WebAii.Wpf.WpfWindow.Detach(Boolean closeWindow)


Warning: Manager.RemoveBrowser() : Attempted to remove a client ID "Client_ae726a31-5fb0-45c4-bc1e-18b5a40cc412" that was not in the list.
Framework: BrowserRemoted.End() : Now aborting the listener thread (TID = 6).
Framework: WpfWindow.Detach() : EXCEPTION! (see below)
     Situation: Exception sending detach command to application window
     Outer Exception Type: System.ArgumentNullException
     Message: Value cannot be null.
          Parameter name: key
     HRESULT: 0x80004003 (Official ID (if app.) = E_POINTER, Error Bit = FAILED, Facility = FACILITY_NULL, Code = 16387)
     Call Stack:
          at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
          at ArtOfTest.WebAii.Messaging.Process.PipeCommunication.GetPipeSync(PipeStream pipe)
          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.Wpf.WpfProxy.DetachApp(Boolean closeWindow)
          at ArtOfTest.WebAii.Wpf.WpfWindow.Detach(Boolean closeWindow)


Warning: Manager.RemoveBrowser() : Attempted to remove a client ID "Client_db492fb9-4704-4713-891e-3e1d3e877906" that was not in the list.
Framework: BrowserRemoted.End() : Now aborting the listener thread (TID = 23).
Ivaylo
Telerik team
 answered on 07 Mar 2014
1 answer
71 views
Hello,

I have an issue with getting the InnerMarkup of a TextArea element in different browsers.

I have the following HTML appear in IE 10:
<textarea id="msgBody"><b> <i>Text</i></b></textarea>

I want to grab the InnerMarkup inside the <textarea></textarea> return a string that would end up being "<b><i>Text</i></b>" instead of "<b> <i>Text</i></b>"

This works fine in IE 10.

However, in IE 11, Chrome 32, and Firefox, it returns me an empty string.
Boyan Boev
Telerik team
 answered on 06 Mar 2014
1 answer
91 views
Hi,

I have a scenario where an alert box appears. I wanted to validate whether a specific alert message appears or not. I am verifying it as below:

Assert(Find.ByContent<HtmlControl>("locator").getValue(), "actual value");
where Locator is the alert message

Now the problem is , although the alert box doesn't appears at the UI level , but since the alert message is present at html script, my test passes . In actual scenario it should fail because alert box doesn't appear.

I think since ByContent<>()     internally uses Javascript it is able to find the locators. 

Please let me know how to fix this because this will pass all the test instead of failing it.



 

Boyan Boev
Telerik team
 answered on 06 Mar 2014
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?