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.

_div function problem

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

I've got a problem with _div function.

It works ok when I test in Sahi Controler recording feature but doesn't work at all in Playback.

Error I receive in log is:

JSERROR TypeError: Cannot find function _div. at Jan 21, 2009 2:19:58 PM

That happens even though I used _continueOnError().

I wouldn't use _div function but I have to - that div have an id attribute but it's different every time. I tested regular expressions against that id, but eventually that didn't work.

Example:
_byId("noteBody51df143a-f81d-49e5-bc81-67c8dd08ee85")
I tried:
_byId(/noteBody.*/)
It didn't work in evaluate expression box, maybe I'll give it a try in Playback.

Thanks,

Maciej

Comments

  • narayannarayan Administrators
    Try using _spandiv instead of _div?
  • pankaj.nithpankaj.nith Members
    edited January 2009
    I just tried _div on this same page and it works fine even in script.
    And as far as RegEx is concerned try using _byId(/noteBody/) if there is only one such element with text "notebody" in its ID.
Sign In or Register to comment.