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.
Capturing a Snackbar
Hello everyone, in my company we work with Sahi, but it is implemented with Java code. The tool we are automating has many snackbars or confirmation labels for certain actions, which disappear after a certain amount of time. Sometimes, Sahi detects this snackbar, captures it, and we use it for validations. However, other times it doesn't, as it seems the snackbar disappears too quickly for Sahi to detect it in time. Does anyone know of a method to make Sahi detect these types of elements faster, or a way to make the snackbar remain visible for a bit longer? It’s important to mention that I don't have access to the tool's source code, so I cannot increase the display time of the snackbar.
I appreciate any help you can provide.
Comments
Hi,
You can use _byPassWaitMechanism API to by pass the default wait.
https://resources.sahipro.com/docs/sahi-apis/script-execution-control-apis.html#_byPassWaitMechanism
You can use the below code and check.
b.byPassWaitMechanism(true);
// Perform action to bring the snackbar
// assert
b.byPassWaitMechanism(false);
If this doesn't work, please reach to support@sahipro.com.
Thanks,
Pratik