18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
sencha gxt changed value in combobox 1 does not refresh value in combobox 2 only ifdone through sahi
Hi!
I have two comboboxes. If a user selects a certain value in combobox 1, the value in combobox 2 is reset to null so that the second combobox appears empty.
This always works if I manually click on combobox 1 to let the options appear and then click on that certain option to select it - the second combobox will redraw and appear empty.
If I do the same through sahi, the second combobox will not redraw but hold its previous value.
I use sahi in Twist, so it`s java:
browser.div("/.*/").near(browser.textbox("ID")).click();
browser.div("optionToBeSelected").click();
This selects the new value in combobox 1 and is similar to narayans suggestion here http://sahi.co.in/forums/discussion/2029/problem-in-record-and-playback-of-extjs-application/p1
The first line clicks on the image of the combobox to let a dropdown appear, the second line selects a value from that dropdown. That's not the problem, this works.
My comboboxes are similar to this ones: http://www.sencha.com/examples/#ExamplePlace:combobox
except that at senchas there are no dependencies between those comboboxes.
I let a testcase run until after the selection of the new value in combobox 1 and then let sahi wait. I see the old value in combobox 2. When I then click manually anywhere in the browser, combobox 2 suddenly shows empty and the old value is gone, like it woke up because of the click and refreshes.
If I rerun the testcase and let sahi click elsewhere on the page, nothing happens, combobox 2 keeps holding the value.
This does not happen regularly, sometimes it redraws, sometimes it does not. Waiting for the refresh does not help. I waited 2 minutes for the second combobox to redraw, but it did not happen on it's own, only when I clicked anywhere.
With sahi I tried clicking on the textbox itself instead of the image next to it, same behaviour. I tried with focus() and removeFocus() on the second combobox to "wake it up", same behaviour. I turned on traffic logging, but I could not find any hints. Also, I don't now what exactly to look for. At least I found nothing in response.body_unmodified_xxx and response.body_modified_xxx which seems to be related to sahi, so I took that as a good sign.
I also removed application/octet-stream from download_contenttypes.txt like narayan said here http://tytosoft.www51.a2hosting.com/forums/discussion/2276/values-of-combobox-arent-loaded-with-using-sahi/p1but same behaviour.
Any ideas?
I have two comboboxes. If a user selects a certain value in combobox 1, the value in combobox 2 is reset to null so that the second combobox appears empty.
This always works if I manually click on combobox 1 to let the options appear and then click on that certain option to select it - the second combobox will redraw and appear empty.
If I do the same through sahi, the second combobox will not redraw but hold its previous value.
I use sahi in Twist, so it`s java:
browser.div("/.*/").near(browser.textbox("ID")).click();
browser.div("optionToBeSelected").click();
This selects the new value in combobox 1 and is similar to narayans suggestion here http://sahi.co.in/forums/discussion/2029/problem-in-record-and-playback-of-extjs-application/p1
The first line clicks on the image of the combobox to let a dropdown appear, the second line selects a value from that dropdown. That's not the problem, this works.
My comboboxes are similar to this ones: http://www.sencha.com/examples/#ExamplePlace:combobox
except that at senchas there are no dependencies between those comboboxes.
I let a testcase run until after the selection of the new value in combobox 1 and then let sahi wait. I see the old value in combobox 2. When I then click manually anywhere in the browser, combobox 2 suddenly shows empty and the old value is gone, like it woke up because of the click and refreshes.
If I rerun the testcase and let sahi click elsewhere on the page, nothing happens, combobox 2 keeps holding the value.
This does not happen regularly, sometimes it redraws, sometimes it does not. Waiting for the refresh does not help. I waited 2 minutes for the second combobox to redraw, but it did not happen on it's own, only when I clicked anywhere.
With sahi I tried clicking on the textbox itself instead of the image next to it, same behaviour. I tried with focus() and removeFocus() on the second combobox to "wake it up", same behaviour. I turned on traffic logging, but I could not find any hints. Also, I don't now what exactly to look for. At least I found nothing in response.body_unmodified_xxx and response.body_modified_xxx which seems to be related to sahi, so I took that as a good sign.
I also removed application/octet-stream from download_contenttypes.txt like narayan said here http://tytosoft.www51.a2hosting.com/forums/discussion/2276/values-of-combobox-arent-loaded-with-using-sahi/p1but same behaviour.
Any ideas?
This discussion has been closed.
Answers
in case somebody faces the same problem, this is not only the fix for angularjs but also for my sencha comboboxes:
http://sahi.co.in/forums/discussion/4635/bugreport-input-event-not-firing/p1
mop says there: "We have hacked the cocat.js locally and changed
Sahi.prototype.simulateKeyPressEvents
"this.simulateKeyEvent([keyCode, 0], el, "input", combo);" at the end of the function fixes the problem for us."
Now a dependent combobox refreshes it's displayed value if the value in the first combox is changed.