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.

click on div element doesn't work in IE 8

minmin Members
edited October 2011 in Sahi - Open Source
Hi,

I have a problem with _click on div element won't work in IE 8, but it does work in FF and Chrome, the _click looks like this:

_click(_div($fdRow, _in(_div("/x-combo-list/"))));

when played back, sahi says: "Error: The parameter passed to _click was not found on the browser"

any solution for this?

Thanks in advance.

Min

Comments

  • minmin Members
    Actually I found that in IE 8, sahi can only identify the default div option during playback, while the rest of the combo list items seem invisible to sahi. don't understand why.

    any suggestion for this?

    Thanks.

    Min
  • minmin Members
    Again, in IE 8, I tried to make sahi click on the default div option first then switch to other options, at this time sahi works, can't figure out why was that.

    Does anyone have any idea about this?

    Thanks,

    Min
  • Hi min,

    As every browsers behave differently, _div($fdRow) will be present in the DOM but in case of Internet Explorer you will first have to first perform _div("/x-combo-list/") and then perform click on _div($fdRow).

    Regards
    Sumitra
  • minmin Members
    Hi Sumitra,

    Thanks for your reply, what do you mean by "you will first have to first perform _div("/x-combo-list/")"? do you mean changing my scripts from:

    _click(_div($fdRow, _in(_div("/x-combo-list/"))));

    to:
    _click(_div("/x-combo-list/"));
    _click(_div($fdRow, _in(_div("/x-combo-list/")))); ?

    Thanks,

    Min
  • Hi Min,

    I dont know what type of combo list items you are using. If its HTML list box and if you Ctrl+Hover on the list box Sahi will identify that as _select();

    Here is an example and for the URL:

    http://www.zkoss.org/zkdemo/combobox/customizable_combobox

    _setSelected(_select("iDEP0"), "Classic Blue");

    If it is not an HTML listbox or combobox then it will be identified as explained with the below URL:

    http://www.zkoss.org/zkdemo/combobox/customizable_combobox

    The script is:

    _navigateTo("http://www.zkoss.org/zkdemo/combobox/customizable_combobox";);
    _click(_italic("/-btn/"));
    _click(_div("Basic"));

    Let me know if this solves your issue.

    Regards
    Sumitra
  • lacytlacyt Members
    edited May 2012
    Hi,

    I have a similar problem in IE 9. I try to select a country but it does not work in this browser. This is the message displayed in the log for the div element although the country was selected:
    "Error: The parameter passed to _click was not found on the browser"

    This is the code I use:
    _click(_textbox("country"));
    _click(_div("Albania"));

    I have tested on Firefox and it works perfectly. Does anyone know how can I solve the problem?

    Thank you in advance!
  • minmin Members
    Hi lacyt,

    Kindly try _mouseDown instead of _click, you can change your script like this:

    _click(_textbox("country"));
    _mouseDown(_div("Albania"));

    not sure whether your Div element is a combo list or not, if it is a combo list, better use DOM position api to help sahi identify your object like:

    _mouseDown(_div("Albania", _in(_div("/x-combo-list/"))));

    Hope it works for you.

    Cheers
    Min
  • lacytlacyt Members
    Thank you for your answer, Min!

    Now, it works!!!

    Regards
    Lacyt
Sign In or Register to comment.