is_logged_in method
Implementation
@override
Future<bool> is_logged_in(Online browser) async {
Show.action('checking', 'if', username, 'is logged in');
try {
final is_logged_in_already = !await browser
.visit(
"https://cbs.almansoori.biz/sap/bc/gui/sap/its/webgui/?sap-client=800")
// .wait(Waitable.PageLoaded())
.has(WithClass(['urLogonData']));
// .has_cookie('https://cbs.almansoori.biz', 'SAP_SESSIONID_ECP_800');
if (is_logged_in_already) {
Show.success("already logged in as", username);
return true;
}
return false;
} catch (e) {
Show.warning("not logged in as", username);
return false;
}
}