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.
RegExp in Sahi
Hi!
I need to parse value from DOM element. So I try this:
$amount_payable_text = _getText( _cell(1, _in ( _row("amount_payable") )) );
$amount_payable = amount_payable_text.match(/[0-9.]+/);
_alert($amount_payable_text) shows that text is ok.
_alert($amount_payable) - shows "recursive_access".
What I do wrong?
I need to parse value from DOM element. So I try this:
$amount_payable_text = _getText( _cell(1, _in ( _row("amount_payable") )) );
$amount_payable = amount_payable_text.match(/[0-9.]+/);
_alert($amount_payable_text) shows that text is ok.
_alert($amount_payable) - shows "recursive_access".
What I do wrong?
This discussion has been closed.
Comments
should have been
$amount_payable_text.match(/[0-9.]+/);
?
Looks like it does not recognize $amount_payable_text as String object.
Can you try using this:
$amount_payable = "" + $amount_payable_text.match(/[0-9.]+/);
instead of
$amount_payable = amount_payable_text.match(/[0-9.]+/);
Let me know if this solves your issue.
Regards
Sumitra