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.
IE autocompleter
OS: Windows XP
Browser: Internet Explorer 8
Sahi Build: v3.5, 2011-07-19
I found Sahi a few days ago, and I really enjoyed playing with it.
It worked quite well, until I tried out one of my testcase with IE.
The autocompleter doesn't want work when I search for something.
* For example if I visit Google => type "sahi t" => choose "sahi testing"
~> The recording will fail.
* Or if I go to ingatlannet.hu => type "Szeg" => choose "Szeged"
~> The Sahi Controllel can record it, so it will work with Chrome or Firefox but IE refuses it.
I've already tried _keyDown, _keyUp, _keyPress, _type but nothing worked.
Is there any idea?:(
Browser: Internet Explorer 8
Sahi Build: v3.5, 2011-07-19
I found Sahi a few days ago, and I really enjoyed playing with it.
It worked quite well, until I tried out one of my testcase with IE.
The autocompleter doesn't want work when I search for something.
* For example if I visit Google => type "sahi t" => choose "sahi testing"
~> The recording will fail.
* Or if I go to ingatlannet.hu => type "Szeg" => choose "Szeged"
~> The Sahi Controllel can record it, so it will work with Chrome or Firefox but IE refuses it.
I've already tried _keyDown, _keyUp, _keyPress, _type but nothing worked.
Is there any idea?:(
This discussion has been closed.
Comments
_setValue(_textbox("q"), "sahi t");
works in a script.
Regards,
Narayan
The old testcase could select from the autocompleter list. I found Sahi so nice, but if it can't support every function, maybe I need to choose something else. The strangest thing Sahi might supports it, because it is good in firefox or chrome. :S
The code below seems to work. Could you please check if this works for you?
_navigateTo("http://www.google.co.in/"
_setValue(_textbox("q"), "sahi to");
_click(_cell("sahi tool"));
Regards,
Narayan
Of course I check every reply, because I don't want to give up!:)
I tried it with Firefox and Chrome, and it was fine.
After that I checked it with IE.
The fully detailed description:
1. In the Playback window...
_navigateTo("..."); // sorry I can't post links, so I replaced it with dots ...
_click(_cell("sahi tool"));
--Stopped Playback: FAILURE--
2. In the Logs...
Test Total Steps Failures Errors Success Rate Time Taken (ms)
real.sah 3 0 1 66% 15917
Starting script
_navigateTo("..."); at 2011.12.16. 9:20:55 // can't post links
_setValue(_textbox("q"), "sahi to"); at 2011.12.16. 9:20:56
_click(_cell("sahi tool"));
Error: The parameter passed to _click was not found on the browser at 2011.12.16. 9:21:07
Stopping script
3. What I can see...
* It navigated to the Google fine.
* It could type the good value
* I couldn't see the autocompleter list, so Sahi couldn't choose from it.
I remember for that in FF or Chrome there was a bit waiting, and after that the autocompleter list appeared.
If you want, I can create a video, but I think I wrote down everything. :$
(In IE I've already visited the SSL manager.)
The Code...
_setValue(_textbox("telepules"), "Szeg");
_click(_listItem("Szeged[1]"));
The Controllel...
_setValue(_textbox("telepules"), "Szeg");
_click(_listItem("Szeged[1]"));
--Stopped Playback: FAILURE--
The Logs...
Test Total Steps Failures Errors Success Rate Time Taken (ms)
iefix.sah 2 0 1 50% 13326
Starting script
_setValue(_textbox("telepules"), "Szeg"); at 2011.12.16. 9:54:00
_click(_listItem("Szeged[1]"));
Error: The parameter passed to _click was not found on the browser at 2011.12.16. 9:54:11
Stopping script
The reason Sahi did not work on your application for IE versions < 9 was because your application uses a javascript library called MooTools which overwrites the native fireEvent function of the browser in an incompatible way. In order to fix this problem, do the following:
Open sahi/htdocs/spr/concat.js
1) Search for
el.fireEvent("on" + type, evt);
and replace it with
el.fireEvent(this.getEventTypeName(type), evt);
2) Search for
target.fireEvent("on" + evType, evt);
and replace it with
target.fireEvent(this.getEventTypeName(evType), evt);
3) At the end of concat.js, add
Sahi.prototype.getEventTypeName = function (type) {
return ((typeof MooTools) == "object") ? type : ("on" + type);
}
4) Restart Sahi, clear browser cache, and test again.
Regards,
Narayan
Thanks a lot for the reply, everything works fine everywhere!
I'm sure in that I can rewrite all the tests to Sahi.
Best wishes,
Claritas