Forum Discussion

Anumakonda_mahe's avatar
Anumakonda_mahe
Frequent Contributor
13 years ago
Solved

Displaying Dynamic fields

Hi,



In our product we have one field such as "No. of Variables" .  new Fields will be listed base on the value given in No.of Variables field. for example: if the No. of Variables(by default 2 is displayed) value is changed to 3 then screen gets refreshed and 3 new fields are listed for entry. so i have recorded scripts for the same. but if i run the recorded script then screen is not getting refresh after entering the value in No. of variables field. tool is simple entering values in fields which loaded default without refreshing the screen.

pls. check screen shot which are attached. let me know the solution for the same
  • Hi,



    Try entering the value to your edit box using the Keys method instead of SetText. Most probably, the OnChange event of your control is not fired because of direct text assignment.

5 Replies

  • Hi,



    Try entering the value to your edit box using the Keys method instead of SetText. Most probably, the OnChange event of your control is not fired because of direct text assignment.
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    If you're using SetText for speed efficiency of your test scripts, you might want to check to see if the event handler method for exiting the field or for changed text is available to call directly.  You could call the SetText followed by that method (such as DoExit or DoOnChange).
  • Hi,



    Also, it's not clear what application type it is. If it is a web application, you can use fireEvent right after SetText to fire the OnChange event.
  • Anumakonda_mahe's avatar
    Anumakonda_mahe
    Frequent Contributor
    Thanks for your Reply,

     

    we are using .NET  web application. the problem is solved in one screen.  but if i use same key function in other object then it is not working.



    today i have  faced one more problem.



    i have recorded the script to selected a category from dropdown box. i got error message when i play it again. it is showing  like " There are several objects in the system that match the recognition attributes of the "tableMaintable" mapped object". how can i over come this.



    Error from Log



    There are several objects in the system that match the recognition attributes
    of the "tableMaintable"
    mapped object.


    This may cause the "Object not found" error.


    Objects




    Sys.Process("iexplore").Page("http://10.10.1.217/PR009A/MainPage.aspx").Form("f1").Table(0).Cell(1,
    0).Table(0).Cell(0,
    1).Frame("AppBody").Frame("bodyFrame").Form("f1").Table("tab1")


    Sys.Process("iexplore").Page("http://10.10.1.217/PR009A/MainPage.aspx").Form("f1").Table(0).Cell(1,
    0).Table(0).Cell(0,
    1).Frame("AppBody").Frame("bodyFrame").Form("f1").Table(0)



    To solve the problem, you may need to modify mapping
    settings for the "tableMaintable"
    object or one of its parent objects.