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.
recorder problem with GWT apps
Hello,
first scuse my poor English for this question. I hope you will understand.
When I record a sahi script, some lines in the script are not able to playback when I try to lunch the script in the "playback" section. The line also not work if I try to test it manually with sahi.
I use sahi with a GWT application. Some script lines work with IE and does not work with firefox.
Can you help me ?
Thanks,
M-A
first scuse my poor English for this question. I hope you will understand.
When I record a sahi script, some lines in the script are not able to playback when I try to lunch the script in the "playback" section. The line also not work if I try to test it manually with sahi.
I use sahi with a GWT application. Some script lines work with IE and does not work with firefox.
Can you help me ?
Thanks,
M-A
Comments
Can you post the script here? We can suggest solutions based on that.
Regards,
Narayan
First of all, I will give you my configuration. Maybe it can be helpful or you can detect some things.
I make a mistake in my previous message, the application is a smartGWT not GWT application. The application is on a serveur on the local network and I type the local ip address (192.168.x.x) on my browser to have access (like this https:(//)<ip address>) and it's a HTTPS application. I use firefox and IE to make script with sahi with the proxy localhost on port 9999.
Certain lines in the script are like this : _click(_div("isc_8C")); but the value isc is not the same each time. It look like a dynamique value and change after a browser refresh per exemple. Certain line recorded are like this: _click(_cell("test3")); but sahi is not able to play this line in the playback or manually. Certain "cell" are working and other not working. It's bizarre !!
Also, recently the dev team make a new Build and certain line of certain script that work previously, they no longer working since the new Build.
Here is an exemple of script like you demand:
_click(_cell("Revues"));
_click(_cell("test3"));
_click(_image("plus.png"));
_click(_image("opener_closed.png[6]"));
_click(_image("unchecked.png[0]"));
_click(_cell("Ajouter"));
An other:
_click(_cell("Revues"));
_click(_image("plus.png[1]"));
_setValue(_textbox("name_fr"), "test3");
_setValue(_textarea("description_fr"), "description test 3");
_setValue(_textbox("projectStartDate_dateTextField"), "2011-01-20");
_setValue(_textbox("projectEndDate_dateTextField"), "2011-01-23");
_click(_image("isc_5V"));
_click(_cell("Certifier"));
_click(_cell("Sauvegarder"));
Also, certain value like the number 6 in this line are changing after a refresh or a new connection _click(_image("opener_closed.png[6]"));
Thanks a lot and I hope this info can help you
M-A
Presently, I develop regression test application for a web application that runs with SSL. This web application is developed with SmartGWT. When I create a test with Sahi Controller, It works well but when I tried to replay the test, I got many troubles with dynamic identifier in HTML div id. In our web application, we have many list control that display data dynamically. I have to simulate selection on list control and sometime rightclick event.
We're using Sahi controller version : V3 Build : 2010-11-03
Windows 7 version 6.1, architecture : amd64
jre version : 1.6.0_23
I develop a Java unit test application with JUnit 4.9 and Eclipse Helios as editor.
Do I need to use XPath or DOM request to point on elements on the Web application?
I also have some trouble with certification that always ask me if I trust site web application for Internet Explorer 8. When I fixed this, then test starts for all test case that I need to simulate.
For Firefox, the test start but It does nothing in the browser. If I ask to fill a form with username and password, application will do operations but I will not see the result in Web browser.
I have the same thing for Chrome and Safari.
my test is very long to run between each step on a JUnit test case. I changed time between step in configuration file but the result doesn't change.
Thanks for the time that you will take to respond to my question and trouble
thanks Rene for complete the info of the problem.
For your info Narayan, Rene is my collegue and we work on the same project. Rene is the real expert in test case. Me I juste record the script with sahi and check if sahi is able to playback the script.
I have a new info. For the same place in the browser but one with Internet Explorer and one with Firefox, the value is not the same. IE give me a "cell" and Firefox give me a "div isc...". This lines are recorded with sahi controller but they not working with the playback or manually.
Exemple:
in IE: _click(_cell("revue5"));
in Firefox: _click(_div("isc_88"));
Neither one nor the other is functional in her respective browser, even manually.
M-A
The same problem i faced when i worked with extjs application. I cant understand the exact problem that you are facing. But just i took a chance...
The div id are randomly changing, whenever the browser refreshes. so better to use "_near" api.
By using labels, divs near to that element we can overcome the problem.
Regards,
Chandrasekhar.
Did you find any solution to your problem?
Chandrasekhar,
Where can I find java code for "near" api?
Try to figure out which parts aren't dynamic and set _in _near and _under relations to the dynamic content.