Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, windows and java based applications. Get your 30 day free trial.
Discuss your Sahi Pro usage patterns, best practices, problems and solutions. Help others solve their problems and seek help from the community when needed. If you need specific support on your application, please email support @ sahipro.com
Discuss your Sahi Pro usage patterns, best practices, problems and solutions. Help others solve their problems and seek help from the community when needed. If you need specific support on your application, please email support @ sahipro.com
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.
Tagged:
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