HTML Select

3 posts, 0 answers
  1. Paola
    Paola avatar
    4 posts
    Member since:
    Apr 2012

    Posted 21 May 2012 Link to this post

    Hello everybody I hope you can help me with this.
    I have an HTML Select list called "Year" that contains years from 1982 to 2013. 

    What I want to do is to select every year because this action display information in another html select list, and select again and so on.

    When I'm recording, I clicked on every year and everything seems to be fine because the information displays, but when I reproduce the steps it only select the element or year, but is not as a click, so the information doesn't appear.

    I know that I can simulate a mouse click or an enter when I have selected the element, I already did that but this is not the correct way that I need it, I also tried to select by id, text, and URL (variable) but didn't work 

    Also I noticed in the webtest.tstest that this particular step appears as a "select" and not as a click, I'm sending you the screenshots to see if you know what to do

    Thanks in advance
  2. Stoich
    Stoich avatar
    1 posts

    Posted 22 May 2012 Link to this post

    Hello Paola,
    I would use a data-driven subtest to select each year (instead of clicking on each one individually):

    On the issue at hand, there's probably a javascript associated with the control.

    Visual Event is a little tool I found which is real useful. It helps you determine what javascript events are associated with a particular control. This ties in with the following jQuery article:

    In the sample we use code to fire off the change event. However, any control can have a variety of events attached to it and you need to determine what those are if you want to fire them manually from code. This tools will help. It’s a “bookmarklet” so you just drag it in your bookmark bar. From there you’re ready to start using it as a browser add-on. Here’s a video demonstrating how to do that:

    All the best,
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Paola
    Paola avatar
    1 posts
    Member since:
    May 2012

    Posted 24 May 2012 Link to this post

    Thank you so much this:Actions.InvokeScript("$(name='elementName').change()");  Really helped me out!!!
Back to Top