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.

Find, but cannot click on button

gligogligo Members
edited July 2012 in Sahi - Open Source
Hello,

The problem happens if I execute the script with sahi
If I execute only clicking on button step, it is workling!


I have the following button:

<em>
<button id="" class="lty_pgtoolbarButtonInner" onmousedown="buttonDown(false,3,0)" onmouseout="buttonHover(false,3,0)" onmouseover="buttonHover(true,3,0)" onclick="try{parent.frames[1].doButton(null,'InsertLock','XXX',3,'')}catch(e){}" type="button">
<span id="" class="lty_pgtoolbarButtonIcon lty_fbuttons_speichsm"> </span>
</button>
</em>

I tries different ways with _in and _near, with using class, but the button is not clicked
It is found, exists, but click is not performed

Can you advise me something?

Comments

  • gligogligo Members
    Can someone help me?
    Can I build my own function, or simulate clicking?
  • ashokashok Members
    can you please send the one liner script to click the button?

    Thanks,
    Ashok.
  • gligogligo Members
    edited July 2012
    Ashok, I hope you need this:

    function doButton(f, cmd, loc, framenum, text) {
    extViaAppMainCurrentPgjbButtText = text;
    if (loc != "XXX") {
    parent.location = loc;
    }
    else {
    parent.frames[framenum].document.forms[0].p_sMode.value = cmd;
    if (cmd == "Insert" || cmd == "InsertLock" || cmd == "Update" || cmd == "Add") {
    if (parent.frames[framenum].Validate_Form("xxx")) {
    parent.frames[framenum].document.forms[0].submit();
    }
    return;
    }
    } return;
    }

    I think, that the problem comes, because I want to click on this button on a popup window..if I dont use popup window it works....
Sign In or Register to comment.