Recorder cannot attach to the browser unless VS is run as an Administrator

12 posts, 0 answers
  1. Daniel
    Daniel avatar
    1 posts
    Member since:
    Jul 2011

    Posted 29 Sep 2011 Link to this post

    I am wondering if it is expected that I have to run vs2010 as an admin to get the plug in to work correctly.  When i don't start it as an admin the recorder fails to attach to the browser.

    Thanks,
    Dan Snell
  2. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 30 Sep 2011 Link to this post

    Hello Daniel,

    I'm sorry you are experiencing this problem. Which version of Test Studio are you using? We recently implemented changes so that you do not need to run as administrator. I've tried to reproduce your issue with our latest release R2 2011.2.928, and the recorder works fine without admin privileges. 

    If the issue still persist using our latest release, please give us some more info on your configuration(version of Internet Explorer, OS) and the exact error you are receiving so we can try to reproduce the issue and fix it.
     
    Hope to hear from you soon!

    Kind regards,
    Plamen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Daniel
    Daniel avatar
    1 posts
    Member since:
    Jul 2011

    Posted 30 Sep 2011 Link to this post

    Configuration:
    Windows 7 64-bit
    VS2010 Premium
    Test Studio 2011.2.928.0
    IE 8.0.7600.16385

    I installed the Test studio build over the internal build (late August) I was working with previously.

    Scenario - 

    1. Start visual studio (not as admin)
    2. open a test studio project
    3. connect to an existing browser or start a new recording.

    Expected:
    Browser connects

    Actual:
    ---------------------------
    Telerik - Test Studio
    ---------------------------
    Failed to launch the browser. Error: System.TimeoutException: Wait for condition has timed out
       at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo)
       at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout)
       at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Int32 timeout)
       at Telerik.TestStudio.Web.WebRecorderWindowManager.WaitForRecorderCallBackReady()
       at Telerik.TestStudio.Web.WebRecorderWindowManager.<>c__DisplayClass6.<AttachRecorderToWindow>b__4()
    ---------------------------
    OK   
    ---------------------------

    When I run VS2010 as an admin this works fine.  For the moment I am running off a trial liscense until my PO goes through.

    Dan


  4. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 03 Oct 2011 Link to this post

    Hello Daniel,

    I'm sorry for the late response. It is really strange that the recorder is not working on your side. I've built the exact same environment here, but I'm still unable to reproduce the issue. This leads us to believe the issue might be somehow machine specific.

    Pease if you haven't done so already, configure your browser according this instruction. And perform the steps outlined in our troubleshooting guide here

    If the issue still persist, try recording on a different machine and see if it works.

    Please try the suggested above and let me know the result!

    Greetings,
    Plamen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. Daniel
    Daniel avatar
    1 posts
    Member since:
    Jul 2011

    Posted 06 Oct 2011 Link to this post

    My suspicion is that this is a lingering issue related to the upgrade I did from the 2011.1.829.0 (?) build that I performed. I am still required to launch the execution server and test studio with elevated permissions which would explain why I am having problems with my install.  I may try doing a full uninstall and trying to clean up an lingering bits around from the previous build.

    Dan
  6. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 11 Oct 2011 Link to this post

    Hi Daniel,

    Plamen is out of the office so I'll interject. Thank you for the update and please respond if the issue persists after the clean install.

    Kind regards,
    Anthony
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  7. Mateusz
    Mateusz avatar
    4 posts
    Member since:
    Feb 2012

    Posted 06 Mar 2012 Link to this post

    Hi,
    I have similar problem but under IE9.
    Configuration:
    Windows 7 64-bit
    Test Studio 2011.2.1413.0
    IE 9.0.8112.16421
    If I run IE9 under different credentials using runas command then Test Studio cannot connect to this browser. Error below appears:
    [03-06 13:06:05,Telerik.TestStudio.exe(5176:6),Recording] RecordViewController.BrowserLaunched() : Error launching the recorder. Error : System.TimeoutException: Wait for condition has timed out
       at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo)
       at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout, WaitResultType errorResultType)
       at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout)
       at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Int32 timeout)
       at Telerik.TestStudio.Web.WebRecorderWindowManager.WaitForRecorderCallBackReady()
       at Telerik.TestStudio.Web.WebRecorderWindowManager.<>c__DisplayClass6.<AttachRecorderToWindow>b__4()

    IE9 is configured based on this http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/configure-your-browser/internet-explorer.aspx

    Please help

    BR
    Mateusz
  8. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 06 Mar 2012 Link to this post

    Hi Mateusz,

    I am sorry you are running into problems. I am not sure I completely understand the steps you are taking that lead up to the error. You state "If I run IE9 under different credentials using runas command then Test Studio cannot connect to this browser". My confusion here is that if you click our Record button, we launch IE for you. You don't get the opportunity to use the RunAs menu option. Similarly when you execute a test we launch IE for you. Again you don't get the opportunity to use the RunAs menu option. What exactly are you doing that leads to his behavior? Can you record a video of your actions so we can fully understand what you are trying to do? Jing is a good and free screen recorder. 

    From a high level, why would you even try to run IE under different credentials? What problem are you trying to tackle? I fear Test Studio may not be able to support it simply because (as I previously stated) when execute a test we launch IE for you. You don't get the opportunity to use the RunAs menu option.

    We do have this one troubleshooting guide that may assist you however:
    http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/troubleshooting_guide/recording-problems/unable-to-launch-recorder.aspx 

    Greetings,
    Cody
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  9. Mateusz
    Mateusz avatar
    4 posts
    Member since:
    Feb 2012

    Posted 06 Mar 2012 Link to this post

    Hi,

    If we use "Record" button we have two options:
    - launch new recording browser
    - use existed open browsers

    So I have open three IE9 windows. Each IE9 window is opened under different credentials (by using runas command).
    Each user has different security configuration that's why it's important for me to record tests under different credentials.
    I know I can do it by configuring IE to asking credentials every time "Internet Options" -> "Security" tab -> button "Custom level" -> "User Authentication" -> set "Prompt for user name and password"
    By I wonder why Telerik Test Studio cannot  connect to those existed open browsers.

    I hope it's clear now

    Thanks in advance

    BR,
    Mateusz
  10. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 06 Mar 2012 Link to this post

    Hello Mateusz,

    Thanks yes that does clear up how/when you are running into this problem.

    Taking a step back for a moment to look at this from a high level, even if we resolve the "use existed open browsers" issue, it's not clear to me how that will help you in the long run. The next problem I see you will run into is that when you go to execute your test, Test Studio will launch IE for you using the credentials of the currently logged on user. It won't launch it using the credentials you recorded your test under.

    How are you planning to playback your recorded test scripts such that they will succeed?

    Kind regards,
    Cody
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  11. Mateusz
    Mateusz avatar
    4 posts
    Member since:
    Feb 2012

    Posted 07 Mar 2012 Link to this post

    Ok, I understand that test studio doesn't launch using the credentials I recorded.
    So in this situation I recorded my script as I mentioned below ("I know I can do it by configuring IE to asking credentials every time "Internet Options" -> "Security" tab -> button "Custom level" -> "User Authentication" -> set "Prompt for user name and password")
    But I have another problem which is similar to problem described here http://www.telerik.com/automated-testing-tools/community/forums/test-studio-express/general-discussions/some-problems-with-alert-and-download-dialogs.aspx

    Script consists of three simply steps:
    1. go to main page of application
    2. dialog to enter login and password appears (it's login and password  for domain)
    - it was recorded as Generic dialog but I added Logon Dialog
    3. user is logged

    When I run this scripts error appears (the same as in mentioned link above):
    Wait for condition has timed out
    InnerException:
    System.TimeoutException: Wait for condition has timed out
       at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo)
       at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout, WaitResultType errorResultType)
       at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout)
       at ArtOfTest.WebAii.Core.Browser.WaitUntilReady()
       at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
       at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request)
       at ArtOfTest.WebAii.Core.Browser.InternalNavigateTo(Uri uri)
       at ArtOfTest.WebAii.Core.Browser.NavigateTo(Uri uri)
       at ArtOfTest.WebAii.Core.Browser.NavigateTo(String url)
       at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.NavigateToActionDescriptor.Execute(Browser browser)
       at ArtOfTest.WebAii.Design.Extensibility.HtmlActionDescriptor.Execute(IAutomationHost autoHost)
       at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)

    or another error:
    Timed out waiting '5000' msec. for any dialog to be handled '1'
    InnerException:
    System.TimeoutException: Timed out waiting '5000' msec. for any dialog to be handled '1'
       at ArtOfTest.WebAii.Win32.Dialogs.BaseDialog.WaitUntilAnyHandled(IEnumerable`1 dialogs, Int32 handleCount, Int64 timeoutMilliseconds, Boolean resetHandleCount)
       at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.DialogHandlerDescriptor.Execute(Browser browser)
       at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.DialogHandlerDescriptor.Execute(IAutomationHost browser)
       at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)

    But there is a funny situation because when I go to the last step and selected Run -> To Here everything it's ok
    Please help
  12. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 07 Mar 2012 Link to this post

    Hello Mateusz,

    The first error "WaitUntilReady has timed out" tells me that Test Studio timed out waiting for the browser to return to a ready state after performing some action (click, select, etc.). The usual cure for this is to set "SimulateRealClick" to true.

    The second error simply means Test Studio did not see/handle an some expected dialog. I need to see this problem first hand before I can help diagnose it. Can you record a video of this problem happening? Jing is a good and free screen recorder.

    Regards,
    Cody
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!