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.

Sahi "Object doesn't support this property or method" under IE

tower120tower120 Members
edited November -1 in Sahi - Open Source
Good afternoon!

I got this error when run test under IE :
"Object doesn't support this property or method"

Under all other browsers - all OK. if simplify I do this:
_setFile
_eval
_click

Thats from my log:

_click( _link(0, _in(_byId("tabUploader"))) );
_setFile(_file("picture_file_1"), "D:\\Images\\sunrise.jpg", "upload/file_from_swf?action=upload");
_eval("document.getElementById('"+ "picture_file_1" +"').changeEvent()");
_setFile(_file("picture_file_2"), "D:\\Images\\dock.jpg", "upload/file_from_swf?action=upload");
_eval("document.getElementById('"+ "picture_file_2" +"').changeEvent()");
setServerVar('___lastValue___1303133441899', _isVisible(_link(0, _in(_byId("useInDesignPopupUploadBtn")))));
setServerVar('___lastValue___1303133443537', _isVisible(_link(0, _in(_byId("useInDesignPopupUploadBtn")))));
_click( _link(0, _in(_byId("useInDesignPopupUploadBtn"))));
_click( _div("smallGalleryInTab") );
Object doesn't support this property or method (http://cdn.optimalprint.net/c/js/1303121357/js_y_c/image_loader.js%7Cjs_y_c/design_editor_v3_Common.js%7Cjs_y_c/design_editor_v3_DesignerElement.js%7Cjs_y_c/design_editor_v3_DesignerElementImage.js%7Cjs_y_c/design_editor_v3_DesignerElementText.js%7Cjs_y_c/design_editor_v3_StaticElement.js%7Cjs_y_c/design_editor_v3_StaticElementImage.js%7Cjs_y_c/design_editor_v3_AbstractDesigner.js%7Cjs_y_c/design_editor_v3_Rulers.js%7Cjs_y_c/design_editor_v3_DesignEditor.js%7Cjs_y_c/design_editor_v3_UndoManager.js%7Cjs_y_c/design_editor_v3_ImageEditor.js%7Cjs_y_c/small_gallery.js:292)

Comments

  • I have run into similar issues with error message in AJAX applications. The root problem is that the element in question was in the process of being inserted/replaced by the AJAX response when the Sahi processor is attempting to identify/process the script. I used a construct similar to the following to work around this issue. My solution will attempt the operation a number of times, incrementing an error count if an exception is thrown. This solution works 100% in our pure AJAX applications. Here's an example:

    var errorCount = 0;

    do
    try {
    _click(_div("smallGalleryInTab"));
    break;
    } catch (e) {
    errorCount++;
    _wait(1000);
    }

    } while (errorCount < 3);
  • The most intresting thing that it really CLICKED that button, but did not uderstand that :)

    I mean, actions that must occurs after clicking on that button - occurs, but sahi still try to do:
    _click( _div("smallGalleryInTab") );

    And not die by timeout.

    Let me remind, that this things happens under IE only.
  • narayannarayan Administrators
    Hi tower120,

    Could you try

    _mouseDown( _div("smallGalleryInTab") );

    instead of

    _click( _div("smallGalleryInTab") );

    ?

    Regards,
    Narayan
  • I try _mouseDown - yes it goes further, but button not clicks :).

    And by the way _mouseDown not work at all for me - not only at this button.

    Problem not in
    _click( _div("smallGalleryInTab") );
    but in:
    _click( _link(0, _in(_byId("useInDesignPopupUploadBtn"))));
  • For examle, here http://www.optimalprint.com/ I try in IDE execute this:
    _mouseDown( _span("Shop for business") );

    Nothing happens.
  • cateamcateam Members
    edited May 2011
    I have the same trouble using _mouseDown function. Let's hope, someone can provide an explanation on how it works exactly.
  • narayannarayan Administrators
    Hi cateam,

    A _click consists of _mouseDown _keyPress and _mouseUp.
    Sometimes one of them may work better than the other. Generally it is very dependent on the js implementation code of the web app. So _mouseDown not working for your link may not be related to the span problem. We will be making an open source release within a couple of days, so you should be able to use _click on your page (which actually works with _mouseDown for us on IE8, FF4 and Chrome10)

    Regards,
    Narayan
  • cateamcateam Members
    Ok. Good to know. But since it was the same effect (no action after using _mousedown function), I thought it was the same issue. Let's hope the new version will fix this out.
    Thanks.
Sign In or Register to comment.