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.

iframe example

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

Here is a good & simple example of page using iframe : http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm

I am trying from the above page to record a script.
Goal :
Action 1 : Click on "click here" link to load "external5.htm" into the iframe located on the page.
Action 2 : Once it's loaded, there is a link called "clicking here" which i am trying to click but that link in the new iframe is not found.


My try without success :

_navigateTo("http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm";);
_click(_link("clicking here"));
_click(_link("click here"));
_click(_link("clicking here"));
//_click(_link("clicking here[1]"));
_click(_link("clicking here"));
_click(_link("click here"));
_click(_link("clicking here"));


How can I make this work? It's not possible?

Comments

  • SumitraSumitra Members
    Hi cateam,

    Can you post the details of info tab in the controller.

    Regards
    Sumitra
  • cateamcateam Members
    Hi,
    This is the detail of my error report.

    Starting script
    _navigateTo("http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm";); at 6 mai 2011 12:46:18
    _click(_link("clicking here")); at 6 mai 2011 12:46:18
    _click(_link("clicking here")); at 6 mai 2011 12:46:18
    _click(_link("click here")); at 6 mai 2011 12:46:19
    _click(_link("click here")); at 6 mai 2011 12:46:19
    ERROR
    Step >_sahi._click(_sahi._link("clicking here"));< did not complete in 150 seconds. at 6 mai 2011 12:48:52
    Stopping script

    Tell me if I can provide you more info than this.
  • cateamcateam Members
    edited May 2011
    Hey,

    I was wondering if we could have somewhere a clear explanation or a video showing how to make Sahi works with Iframe?
    I have seen so many post regarding iframe & still haven't find anyone who can make it work.
    I have also tried the demo in sahi installation folder but it's still not helping me to make it work.

    How come with that simple exemple of iframe on the website I have put in my first post, We can't make it work as we would like.
    It's on IE, it's on same domain name. Isn't Sahi able to handle such case? What am i missing?

    Thanks for your support again
  • narayannarayan Administrators
    Hi cateam,

    IFrames and Frames generally work without a problem. You would notice that people run into problems mainly when they are switching domains.

    In your case, there is indeed a bug in Sahi on link clicks on IE which have an href as "javascript:..". We have fixed this and will be available in the next release.

    Meanwhile you can make your script run with this:
    _navigateTo("http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm");
    _click(_link("clicking here"));
    _mouseDown(_link("click here"));
    _click(_link("clicking here")); 
    //_click(_link("clicking here[1]"));      
    _click(_link("clicking here"));
    _mouseDown(_link("click here"));
    _click(_link("clicking here"));
    

    Regards,
    Narayan
  • cateamcateam Members
    Great!! It's working now. Let's hope this will help us to continue our good work with Sahi.
    Again, Shurkiya Narayan for your help.
  • cateamcateam Members
    edited May 2011
    Hi Narayan,

    I think I replied to fast.

    How to make this action work :
    _mouseDown(_click(_link("click here")));
    _click(_link("clicking here"));

    because the action you suggest :
    _mouseDown(_link("click here"))); => this actually don't click on the link. Nothing changes on the page when i do just this action.
    _click(_link("clicking here"));

    Do you see what I mean? Can you have a look again on this ? Thanks in advance.
  • cateamcateam Members
    For information, version used to test _mouseDown are Chrome 11 & IE 8.
    Both case having the same issue.
  • cateamcateam Members
    Still no news on the topic ? Anyone with a solution ? Narayan, any way we can make this work ?

    Let's hope it's not a desperate case.
  • narayannarayan Administrators
    Hi,

    We revisited the problem and found that the bug was still unresolved. We have fixed the bug now. We will be making a new release tomorrow.

    Regards,
    Narayan
  • cateamcateam Members
    edited June 2011
    Hey Narayan,

    I confirm! It's working now with this simple example. We will try it now on our website using also iframe. We will keep u posted but thank you very much already for your help.

    I confirm that it's also working on the case we were blocked on!

    Shukrya again and we can finally close this post.
Sign In or Register to comment.