locked
Unable to capture new window RRS feed

  • Question

  • Hi

    When i login and enter password and click on OK button a new window appears and recording button disappear.

    I am unable to capture new window

    Can u provide some example with code-CODE is needed so please provide with some example

    Tuesday, May 24, 2011 11:48 AM

Answers

  • If you capture your traffic with fiddler (www.fiddler2.com)

    Use the File -> Export Session -> All Sessions functionality to create a visual studio web test

    In visual studio, use the genrate code feature to convert the web test to to a coded web performance test you will get your code in c# or VB depending on your VS preferences.

    I have seen this question posted a couple times.  Does this technique not work for you or maybe I am not understanding what sort of code you are looking for?  If the IE web recorder does not capture everything you want and you don't want to use fiddler you would have to write you own IE add-on or http traffic capturing tool.  Why do that if fiddler fits the bill?


    Tim
    Tuesday, May 24, 2011 1:10 PM
  • With a web performance test you will not "record" any client-side events such as launching a new window or a client side field validation.  Using fiddler though you should still capture the http traffic sent to the server from the new window.  The web test essentially is a server side test.  Given a request from the client, does the server respond correcty?  If you want to capture actual client side events I suggest you consider moving to visual studio 2010 and using coded UI tests or recording tests with Microsoft Test Manager.
    Tim
    Monday, May 30, 2011 1:49 PM

All replies

  • If you capture your traffic with fiddler (www.fiddler2.com)

    Use the File -> Export Session -> All Sessions functionality to create a visual studio web test

    In visual studio, use the genrate code feature to convert the web test to to a coded web performance test you will get your code in c# or VB depending on your VS preferences.

    I have seen this question posted a couple times.  Does this technique not work for you or maybe I am not understanding what sort of code you are looking for?  If the IE web recorder does not capture everything you want and you don't want to use fiddler you would have to write you own IE add-on or http traffic capturing tool.  Why do that if fiddler fits the bill?


    Tim
    Tuesday, May 24, 2011 1:10 PM
  • Thanks Tim

    I dont know how to use fiddler

    Yes i want C# code i.e. how to capture new window

    please help

     

    Tuesday, May 24, 2011 3:23 PM
  • Using fiddler is pretty easy and I use it often for other things as well. 

    Launch fiddler (it is best to close all other browsers and anything that uses http traffic) make sure fiddler is capturing the traffic (the lower left hand corner of fiddler is a toggle)

    Now launch a browser and navigate your site as if you were recording using a web recorder (use machine name not local host for the server)

    When you are done, go back to fiddler click File -> Export Session -> All Sessions functionality to create a visual studio web test.  Now in a test project, add the webtest you saved in fiddler.

    more help: http://www.fiddler2.com/Fiddler/help/

     

     


    Tim
    Tuesday, May 24, 2011 3:29 PM
  • Is C# code will be captured in fiddler
    Wednesday, May 25, 2011 4:38 AM
  • Hi,

    Are you using web test or coded ui test.

    Fiddler will only record the http requests. You will then have to create web test from the recording and then you can generate code, refer http://msdn.microsoft.com/en-us/library/ms182552.aspx

    For creating coded ui tests, please refer http://msdn.microsoft.com/en-us/library/dd286681.aspx

    Thanks,

    Anuj

    Wednesday, May 25, 2011 6:21 AM
  • Fiddler will capture the data and save it as a .webtest file which is just xml.  Then you can add the webtest file to a test project in visual studio.  If for some reason you want to see or work with the code, visual studio has a feature that will turn a webtest file into c#.  Give it a try, fiddler is freeware.  You should be able to test this whole process in about 10 minutes.


    Tim
    Wednesday, May 25, 2011 9:03 AM
  • Anuj

    I'm afraid I don't understand what you are looking for.  Sounds like you used fiddler and captured all of the requests  you wanted, converted them to VS web tests, then converted to code.

    When you ask what will be request 5 are you saying NOT all the requests were recorded or do you just want guidance on coding a request?


    Tim
    Friday, May 27, 2011 12:50 PM
  • Hi Tim I just needed guidance on coding when i used fiddler it did not capture new window and actions which i performed on new window. Please guide
    Saturday, May 28, 2011 7:57 AM
  • Are you using a web performance test, manual tests with Microsoft Test MAnager, or coded UI test?

    If you are using a web performance test, javascript is launching the new window.  In visual studio when you are running the web test the web test engine does not actually execute javascript but any http requests executed in the new browser should still be executed.

    Maybe you are using a manual test or CodedUI test??


    Tim
    Sunday, May 29, 2011 11:51 AM
  • In VSTS 2008 is it possible to capture new window

    As VSTS 2008 dont support java script.

    Please help

    Monday, May 30, 2011 12:05 PM
  • With a web performance test you will not "record" any client-side events such as launching a new window or a client side field validation.  Using fiddler though you should still capture the http traffic sent to the server from the new window.  The web test essentially is a server side test.  Given a request from the client, does the server respond correcty?  If you want to capture actual client side events I suggest you consider moving to visual studio 2010 and using coded UI tests or recording tests with Microsoft Test Manager.
    Tim
    Monday, May 30, 2011 1:49 PM