Completed
Last Updated: 17 Jul 2014 12:04 by ADMIN
ADMIN
Cody
Created on: 08 Jul 2014 16:41
Type: Bug Report
1
OnChange is called twice
1) Place the attached htm file into your local IIS folder
2) Adjust the navigate to URL as needed in the test
3) Run the test

Expected: The alert dialog to be shown once
Actual: The alert dialog is shown twice, indicating that OnChange is incorrectly called twice.
2 comments
ADMIN
Iliyan Panchev
Posted on: 17 Jul 2014 12:04
You will need to use a coded step to handle this scenario:

For example: if you convert the selection step to code it will generate the following:
Pages.HttpAt.RegistrationAnimalCategoryCodeSelect.SelectByIndex(3, true);

which is also equivalent to:
Pages.HttpAt.RegistrationAnimalCategoryCodeSelect.SelectByIndex(3, true, true);

The first 'true' argument will try to invoke the change event using InvokeEvent(ArtOfTest.WebAii.Core.ScriptEventType.OnChange)
The second 'true' argument will try to invoke it using the alternative InvokeScript method which invokes it using the "initEvent" JS function.

If the event is triggered twice like in this case, it should be enough to set the second true to false like this:
Pages.HttpAt.RegistrationAnimalCategoryCodeSelect.SelectByIndex(3, true, false); 
Cody
Posted on: 08 Jul 2014 16:43
This comes from support ticket 836981.