18 January 2026:


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.

Automating GWT application using Sahi

VidhyaVidhya Members
edited November -1 in Sahi - Open Source
OS Name:Windows XP(version 5.1)

Browser Name and Version:Mozilla Firefox/5.0

Sahi :V3.5

Build :2011-05-25

Hi,
We are in a process of using SAHI to automate our UI testing.But as we are new to this tool,we are facing a beginning crunch.How to Start? So can anyone give a brief introduction that will help us to kick off the testing using SAHI,in our organization?Our front end framework is GWT.

Regards,
Vidhya

Comments

  • Hi

    does this help? http://sahi.co.in/w/sahi-v35-tutorial
    what further questions do you have. Testing GWT should be no problem.. well, only the DatePicker seems to be quite tricky. but you will find enough help in this forum^^

    also have a look here
    http://sahi.co.in/forums/viewtopic.php?id=2308
    http://sahi.co.in/forums/viewtopic.php?id=1123

    Regards
    Wormi
  • VidhyaVidhya Members
    Following are some issues that we are facing during our automation using Sahi.Please give valid informations regarding these points


    1)_assertContainsText(expectedText, element, message)

    Whether 'element' change according to the server? or Is 'element' server specific?

    2)We selected browser IE7.But the window gets closed when we click IE 7 in Sahi Dashboard

    Regards,
    Vidhya
  • Hi

    2) I can't say much about IE, please use the search function of this forum. What I can say is: automating with IE is no problem. But as usual, the IE is kinda special :)
    1) When defining an element in a script, there is no check if the element exists. But when you access the element, Sahi will look for it in the page. You can specify elements by position, id, DOM relation and so on. This means: you can have a generic element like _span(0), or pretty specific _span("id"); What _span(0) accesses, depends on the html content of the site your are browsing, while _span("id") may match no DOM element on the page. Is this explaination usefull? If not feel free to ask more :)
  • VidhyaVidhya Members
    Thank You for your response.But i'm not clear with the explanation

    When I am running the same application in different servers,the element id is changing.So i can't generalize the message validation scripts.So kindly give suggestion regarding this.

    Regards,
    Vidhya
  • As I tried to explain, when you generalize the element accessor by giving for example a regular expression and/or a dom relation identifier http://sahi.co.in/w/browser-accessor-apis you can handle changing element ids.
  • VidhyaVidhya Members
    We tried to build our GWT code with style 'Detailed', in order to keep the element id constant.But element id is still changing.So we cant generalise our script.

    After changing the code with style 'Detailed 'and tried to open using Sahi IDE,URL is not opening.I am not sure whether it is an issue with operating system as my machine has windows XP whereas the same URL opened with Sahi in WINDOWS 7 machine.

    Can u please guide on this.

    Regards,
    Vidhya
  • VidhyaVidhya Members
    How to open multiple tabs in mozilla firefox using sahi script?
  • bagsmodebagsmode Members
    Vidhya wrote:
    We tried to build our GWT code with style 'Detailed', in order to keep the element id constant.But element id is still changing.So we cant generalise our script.

    After changing the code with style 'Detailed 'and tried to open using Sahi IDE,URL is not opening.I am not sure whether it is an issue with operating system as my machine has windows XP whereas the same URL opened with Sahi in WINDOWS 7 machine.

    Can u please guide on this.

    Regards,
    Vidhya

    Vidhya,

    I had a similar issue and I just created a loop thru to build the id's and use isVisible():

    var $flagfound = false;
    var $i = 1;
    for ($i = 1; _isVisible(_table("report employeeSheet["+ $i + "]")) && !$flagfound && $i < 100; $i=$i+1) {
    if ( _containsText(_table("report employeeSheet["+ $i + "]"), $punchTableLabel)) {
    $flagfound = true;
    }
    }
    if (!$flagfound) {
    _log("ERROR: did not find: " + $punchTableLabel, "error");
    }

    where $punchTableLabel is the data/text that I'm searching for.

    Hope this helps,
    Glenn
  • VidhyaVidhya Members
    edited June 2012
    I want to check whether the Save button is disabled by default on form load.

    But _assertTrue(_button("Save").disabled); OR _assertFalse(_button("Save").enabled);

    neither of them is working for me . I am using Sahi Version 3.5 (changed Build 2011-07-19) . Please help.

    Thanks and Regards
    Vidhya
  • TheeranTheeran Members
    Hi Vidhya,

    Please go through the following link,

    http://sahi.co.in/forums/viewtopic.php?id=3079

    This might help you.

    Thanks,
    Theeran.
  • VidhyaVidhya Members
    Hi,

    This solution is not working for us. It shows :

    concat.js: Diff domain: Could not add XHR to list for automatic monitoring TypeError: _sahi.topSahi() is undefined

    also the _call function returns _sahi._call(null)

    Is there any other way to assert button enabling or disabling?

    Thanks
    Vidhya
  • VidhyaVidhya Members
    Hi,

    Sahi Version 3.5 (changed Build 2011-07-19)

    How can we use _under or _near for manipulating Text boxes. For us this is working fine with images. For eg:
    _click(_image("gif",_under(_span("Date From *"))));
    Is working fine.

    _click(_textbox("x-auto",_under(_div("Travel Place From *")))); ---- This is not working.

    Please help us.

    Thanks and Regards
    Vidhya
  • VidhyaVidhya Members
    Hi ,


    I want to write my test results to a html summary report. But how do we identify Passed or Failed asserts, in between the scripts.

    Please do help us.

    Thanks and Regards
    Vidhya
Sign In or Register to comment.