Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ sahipro.com with your query.

Getting [object] as a button value in Sahi

I am working on Sahi and got stuck with this issue.

Issue: I am getting [object] as a value instead of value "true" while asserting the button attribute.

Code: File 1: category.sah

_include("newCatLib.sah");
_click($tabCategory);
_assertEqual("Category Details", _getText($heading), "");
disabledBtn($lowLvlCatEdtBtn, true, $subLvlCatEdtBtn, true);
File 2: newCatLib.sah

var $tabCategory = _span("title[2]");
var $heading = _heading3("page-title");
var $highLvlCatDrpdn = _select(0);
var $lowLvlCatDrpdn = _select(1);
var $subLvlCatDrpdn = _select(2);
var $lowLvlCatEdtBtn = _button(0);
var $subLvlCatEdtBtn = _button(1);

function disabledBtn($lowLvlCatEdtBtn, $boolean1, $subLvlCatEdtBtn, $boolean2) {
var $isDisabledBtn1 = _getAttribute($lowLvlCatEdtBtn, "disabled");
_assertEqual($boolean1, $isDisabledBtn1);
var $isDisabledBtn2 = _getAttribute($subLvlCatEdtBtn, "disabled");
_assertEqual($boolean2, $isDisabledBtn2);
}
Execution Log:

[-] **disabledBtn([object], true, [object], true)**
_assertEqual(true, true) [257 ms] [08:28:29.537]
_assertEqual(true, true) [253 ms] [08:28:29.790]
I have checked Button accessor in HTML code which is correct.

Let me know if more details needed.

Help out. Urgent.
Sign In or Register to comment.