Coded step errors in AJAX setting

5 posts, 0 answers
  1. Alex Rak
    Alex Rak avatar
    6 posts
    Member since:
    Jun 2008

    Posted 01 Oct 2012 Link to this post

    Hi,

    I'm testing an AJAXified RadGrid on a web page. I want to make sure that sorting works properly. So I've created a coded step that would iterate each row, pool the values from a given column, and compare the list to a sorted sample.

    The step passes if I run it right after the initial page load, but when I start clicking grid headers before running my step, that's when it hits the fan.

    All my steps that simulate clicking different column headers, do pass. The grid's content is getting updated via AJAX on each click, though. When it's time for my coded step to be executed I have two issues:

    (1) the test fails as it seems to be using the initial loaded page content (not the version updated via AJAX), and

    (2) I can't debug the code using breakpoints as the debugger gives me the following error: "Unable to apply this change while debugging. File '(snip)\Pages.g.vb' was reloaded. You must revert the change or stop the debugging session."

    So it seem like the Pages.g.vb file is regenerated with each AJAX call, but the coded step is bound to the inital version.

    How would I fix this scenario?

    Regards.
     
    EDIT: This post might better belong to regular Test Studio forum, but it does refer to a Visual Studio 2010 plugin.




  2. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 05 Oct 2012 Link to this post

    Hi Alex Rak,

    I apologize for the delay in getting back to you on this. After each click on a column header element, you need to wait for the AJAX Postback to complete as seen in this article. Once it's completed, your coded step should act against the updated grid content.

    The Pages.g.vb file is dynamically generated on each run, so it's not allowed to have that file open during debugging, otherwise you'll receive the "Unable to apply this change while debugging.." error.

    If you continue to have difficulty, would it be possible to provide us with the means to reproduce the issue locally(either in your app or on a public site)? If not, a Jing video demonstrating and the issue may also help us to better understand what is happening.

    Regards,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Alex Rak
    Alex Rak avatar
    6 posts
    Member since:
    Jun 2008

    Posted 05 Oct 2012 Link to this post

    Hi Plamen, thanks for getting back on this.

    I do have delays in my test to make sure AJAX response is processed. I'm attaching the test VS2010 project.

    If you run the test in debug mode, you will see that the it fails as the test column data is stale.

    Now, try to set a breakpoint inside the coded step, and navigate it with "Step Forward (F10)". The compiler will never get there.

    So what exactly am I missing here?

    Regards.
  4. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 10 Oct 2012 Link to this post

    Hello Alex,

    Thank you for providing the project. I was able to reproduce the issue and logged it as a bug here: Public URL. This turned out to be a complex issue however, and our developers will need more time to fix it. I'll update this thread once we have a fix for this.

    I have also updated your Telerik points for discovering the issue.

    All the best,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  5. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 23 Oct 2012 Link to this post

    Hi Alex,

    I'm writing to inform you that we just released a new internal build, version 2012.2.1022. This fix is included in the build. You can download it from your Telerik account here: Public URL

    Regards,
    Plamen
    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!