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.

multiple tables with same name

sivadreamssivadreams Members
edited November -1 in Sahi - Open Source
I am using _parentTable(_byId("listTableLinkBody")) to access a table which has no table id.
This access the first table on the application.

How do I identify the other tables of the same name. I have atleast three to four tables in the same page with the same name.


For example something like .. _parentTable(_byId("listTableLinkBody"[1]))

But this is wrong… what’s the right way?

Comments

  • narayannarayan Administrators
    (Copy of paid support request.)

    Siva,

    Sorry, ids are supposed to be unique and _byId("xx[j]") will not work.


    There is one other way by which you can identify your tables. I saw that the table has a class and I think the classes are unique to such tables on your page.

    Can you try
    _byClassName("tableClass", "TABLE")

    and

    _byClassName("tableClass[1]", "TABLE")

    If you look via Firebug, you will see something like <table class="xxx yyy">
    In that case you should use

    _byClassName("xxx yyy", "TABLE")
    and
    _byClassName("xxx yyy[1]", "TABLE")


    Regards,
    Narayan
Sign In or Register to comment.