0

I am using Sahi as the Automation tool but I have a problem identifying one of the fields.The field gets changed during runtime and I am unable to catch it. I am attaching the image here. The fields Read and Skipped are both identified by the below properties:

Read

_div("0[1]")
  _div("cell-right fg-000000[1]")
    _div(613)

Skipped

_div("0")
  _div("cell-right fg-000000")
    _div(615)

However the array [1] gets on interchanging and i am getting the below error everytime i execute the script.

_sahi.setServerVarForFetch('___lastValue___1429772452227', _getText(_div("cell-right fg-000000[1]"))); [9205 ms] [12:31:00.321]
Error: The parameter passed to _getText was not found on the browser
at: (C:\sahi_pro\userdata\scripts\TLMRP.sah&n=40) checkFileExist

Please help as to how to identify the same.

orde
  • 5,233
  • 6
  • 31
  • 33
Mrinal kumar
  • 67
  • 1
  • 1
  • 9
  • Can you provide an image of your html page where these elements are? Or a link to that page? You can use imgur if you can't upload image here. If you want to try on your own, look at the APIs like _near. _in etc. These will help you identify an element based on a context or reference to other elements. If you can provide the image, I can tell you the exact code to use. Also, which version of sahi are you using? – Vivek V Dwivedi Apr 24 '15 at 04:10

1 Answers1

0

If I understand correctly and you just have this field which id is changing, use a regular expression to get it

_div(/fg-000000/)
globalworming
  • 757
  • 1
  • 5
  • 33