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.

same scripts can work in IE, but not firefox,please help

ligangligang Members
edited April 2011 in Sahi - Open Source
I am using java client driver for test. The following scripts can work well in IE.
*******************************************************
ElementStub mTable = browser.table("/memberTable/");
ElementStub m1 = browser.cell(mTable,"RMC:871179","Source:ID");
System.out.println(browser.fetch("_sahi.findPosX(" + m1 + ")"));
*******************************************************

It gives the cell 's coordinate x,

But when I run it in firefox3/4, it will pop up the exception:
============================================================
error:_sahi.setServerVarPlain('___lastValue___Thu Apr 14 17:11:20 CST 2011', _sahi.findPosX(_cell(_table(/memberTable/), "RMC:871179", "Source:ID")))
TypeError: obj is null
http://9.123.147.43:8080/_s_/spr/concat.js:903
http://9.123.147.43:8080/_s_/spr/concat.js:890
http://9.123.147.43:8080/_s_/spr/concat.js:3011
http://9.123.147.43:8080/_s_/spr/concat.js:3011
http://9.123.147.43:8080/_s_/spr/concat.js:2819

at net.sf.sahi.client.Browser.executeStep(Browser.java:223)
at net.sf.sahi.client.Browser.execute(Browser.java:190)
at net.sf.sahi.client.Browser.fetch(Browser.java:467)
============================================================

Anyone can help ? thanks a lot

Comments

  • narayannarayan Administrators
    Hi Ligang,

    One says /table1/ and the other says /memberTable/
    Is that correct?

    Regards,
    Narayan
  • ligangligang Members
    Sorry, narayan, I modified it before I post this scripts, but It does can't work.
  • ligangligang Members
    Anyone can help? It is a little urgent, thanks
  • narayannarayan Administrators
    Hi Ligang,

    Can you do a

    System.out.println(m1.exists());

    first to see if the element is available on FF?

    Regards,
    Narayan
  • ligangligang Members
    code:
    System.out.println("m1 object: "+m1.exists());

    Result:

    IE:m1 object: true
    FF:m1 object: false
  • ligangligang Members
    is this a bug for _sahi.findPosX method ?
Sign In or Register to comment.