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.

handle a new window

adsads Members
edited November -1 in Sahi - Open Source
Hi,

I need to check for a mail link which opens an outlook compose mail page when clicked.

How can I automate with this?

Comments

  • narayannarayan Administrators
    The outlook compose window pops up when a link has href="mailto:email@example.com". It may be enough to check for the href.

    _assertEqual("mailto:email@example.com", _link("Mail Me").href);
  • adsads Members
    Yes I can go with href...but here the object is not getting identified...I can't identify with _near or _in.

    <td class="imgMail cursor bgO" onclick="window.location.href='mailto:jim@abc.com'" OnMouseOver="OnPopUpMouseOverMail();" onmouseout="nd();"></td>

    its directly going for the event on click....
  • narayannarayan Administrators
    Here you may not be able to verify it except by checking for text of onclick handler.

    Eg.
    _assert( ("" + _cell("imgMail").onclick).indexOf("window.location.href='mailto:jim@abc.com'")  != -1 )
    
  • adsads Members
    sorry its not working...

    Error: '_sahi._cell(...).onclick' is null or not an object..

    The cell(_cell("imgMail")) is not here I suppose...The text displayed when moved over Click

    handler is write?

    How can I check for that?
  • narayannarayan Administrators
    Replace the _cell with how your cell is identified.
  • adsads Members
    No...The cell is not getting identified by sahi....I tried with record too but that click on mail icon

    action is not recorded in scripts.

    The _near and _in too is not working out here.
Sign In or Register to comment.