Hi all,
I am working on features using web browser steps to test with the BY mobile application and I ran into the following issue:
On 2 specific places in the flow to test when pressing F6 or F1( e.g. Then I press keys “F6” in web browser) cycle reported the step as successfully executed while nothing happend in mobile in the web browser.
As a result the test failed after a while.
It looks like cycle sent the F6 key or F1 key, but the browser didn’t receive it.
In one place the issue could be solved by adding a ‘Once’-step before pressing the function key (e.g. Once I see “Full Inventory Move” in element “className:appbar-title” in web browser).
But for the 2nd place there is no such obvious change on the screen I could check for.
So my current workaround is to add a wait step before pressing F6.
Then I wait $RFH_truck_deposit_wait_before_F6 seconds
Then I press keys “F6” in web browser
When running the test in the ‘Cycle GUI’ I have to set “RFH_truck_deposit_wait_before_F6” at least to 6 seconds while when running in ‘cycle-cli’ 1 second is sufficient.
Therefore I wonder, if anyone
has an explanation for this behavior?
has an idea how to solve the issue without adding a waiting step before pressing the function key? E.g. Is there an equivalent to terminal step ‘I verify screen is done loading in terminal within seconds’ for web browsers?
I use:
Cycle version: 2.12.1 build 1
Browser: Chrome: Version 109.0.5414.120 (Official Build) (64-bit)
WMS Bundle: 3.1.0
BY WMS version: 2020
When it comes to the CycleScript coding conventions, the third philosophical tenet is to validate state before action.
We recommend this because oftentimes, a system under test is not ready to receive input until it has finished fully loading.
This is likely why you had to add a Once validation and a wait time.
has an idea how to solve the issue without adding a waiting step before pressing the function key? E.g. Is there an equivalent to terminal step ‘I verify screen is done loading in terminal within seconds’ for web browsers?
Unfortunately, there is no equivalent step for web browsers for verifying the screen has finished loading today.
However, you had mentioned there was nothing to differentiate that the screen had changed.
Can you send a screenshot of the before/after screen?
I am wondering if you can try a Once I do not see or perhaps a new cursor position to help differentiate, without having to use an arbitrary wait time.
Hi @JonathanYiv,
Many thanks for your explanation, confirming that there is no equivalent of the ‘terminal loading done step’ for the web browser and especially for your tip regarding the cursor focus in order to find a solution. Thanks to that I have now 2 solution approaches. These are described in the link below (as I only can attach 1 media item in a reply).