18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
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.
Getting the value of the Label Dynamically
Hi,
In my web application .say a product ID is generated dynamically and displayed in the page as a label as..
Product No. 074546565
In my testing , I would like to read that dynamic value.. I tried many ways,, but doesn't work for me,, Please help me with some ideas..
I have tried..
var $value;
_set($value,(top.document.getElementsByTagName('table')[0].rows[1].cells[0].value));
_alert(" the code generated is "+value);
var $value;
_set($value,(_cell(_table(0), 0, 0)).value);
_alert(" the code generated is "+value);
var $value;
_set($value,(_spandiv("Product:")).value);
_alert(" the code generated is "+value);
var $value;
_set($value,(top.document.getElementsByTagName('span')[1]).value);
_alert(" the code generated is "+value);
..any IDEA. *
In my web application .say a product ID is generated dynamically and displayed in the page as a label as..
Product No. 074546565
In my testing , I would like to read that dynamic value.. I tried many ways,, but doesn't work for me,, Please help me with some ideas..
I have tried..
var $value;
_set($value,(top.document.getElementsByTagName('table')[0].rows[1].cells[0].value));
_alert(" the code generated is "+value);
var $value;
_set($value,(_cell(_table(0), 0, 0)).value);
_alert(" the code generated is "+value);
var $value;
_set($value,(_spandiv("Product:")).value);
_alert(" the code generated is "+value);
var $value;
_set($value,(top.document.getElementsByTagName('span')[1]).value);
_alert(" the code generated is "+value);
..any IDEA. *
Comments