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.

404 errors are not showing in sahi controller

edited November -1 in Sahi - Open Source
I have 100 links in my home page....wen iam iam doing manually in that 100 links 2 links are showing 404 error,
but wen iam running a script in sahi controller it is working fine....in logs it is not showing any errors,
Then how to find that type of errors,if i look into the system see the screen then only i can find that type of errors through sahi

Comments

  • plz replay soon asap
  • hello any one can reply plzzzzzzzzzzzzzzzzz

    I have 100 links in my home page....wen iam iam doing manually in that 100 links 2 links are showing 404 error,
    but wen iam running a script in sahi controller it is working fine....in logs it is not showing any errors,
    Then how to find that type of errors,if i look into the system see the screen then only i can find that type of errors through sahi
  • globalwormingglobalworming Moderators
    edited February 2012
    Hi sandeep

    1. the users of this forum reply when they got something to contribute. when you get no answer, there is no one having an answer or is just not in the mood to reply or no one with an answer read your post.
    2. you can do some things to get more people to answer you. please read this http://sahi.co.in/forums/viewtopic.php?pid=5380#p5380 with focus on point 7)
    3. getting an answer within a few hours is pretty good IMHO. you can't expect answers within 10 minutes. some questions will never be answered, even if they are trivial... see 1.
    4. regarding your question:

    after clicking every link you should insert an _assertNotExists($404Error). Use the Sahi Controller on the 404 Error page to find a suiteable element which you can put in for the $404Error.

    Regards
    Wormi
  • This is my code were i want to insert this command _assertNotExists($404Error)..it is showing error
    we have 3 div 1st div is letters in that we have operational urlgroup and non-operational urlgroup

    var $a=_collect("_link", "/./", _in(_div("letters")));

    for (var $i=0; $i<$a.length; $i+=1) {
    _click($a[$i]);
    var $b=_collect("_link", "/./", _in(_div("operational urlgroup")));

    for (var $j=0; $j<$b.length; $j+=1) {
    _click($b[$j]);
    _call(history.back());
    }

    var $c=_collect("_link", "/./", _in(_div("non-operational urlgroup")));
    for (var $k=0; $k<$c.length; $k+=1) {
    _click($c[$k]);
    _call(history.back());
    }
    }
  • What error is shown? Please post the contents.
    I m pretty bad at debugging written code, maybe you coudl provide the URL you are testing, then I would try to make your code work there
  • globalwormingglobalworming Moderators
    edited February 2012
    Hi
    I just tried

    var $a=_collect("_link", "/./", _in(_div("s-links")));
    var $error=_strong("404 Error");

    for (var $i=0; $i<$a.length; $i+=1) {
    _click($a[$i]);
    var $b=_collect("_link", "/./", _in(_div("listing")));

    for (var $j=0; $j<$b.length; $j+=1) {
    _click($b[$j]);
    _assertNotExists($error);
    _call(history.back());
    }

    var $c=_collect("_link", "/./", _in(_div("list")));
    for (var $k=0; $k<$c.length; $k+=1) {
    _click($c[$k]);
    _assertNotExists($error);
    _call(history.back());
    }
    }

    works fine
  • thank u it is working fine...............
Sign In or Register to comment.