New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request]: Eliminate the false "stuck script feeling" #1610
Comments
Dear @ahmednasr95 are you testing normal application or company application behind vpn or proxy |
@ahmednasr95 another note that the provided screenshot related to another issue currently under investigation, i guess the stuck issue you mean is faced also when assertion pass or only in case of failing |
@ahmednasr95 another note that the provided screenshot related to another issue currently under investigation, i guess the issue you mean is faced also when assertion pass or only in case of failing |
|
Kindly share piece of code you use or and your custom properties file if exist |
@zanoon2020 Yes, of course. The following code snippet is the one that causes the problem. driver.assertThat().element(emailExistsErrorMessage).doesNotExist().perform(); In the code above, the I also identified the root cause of the problem. In the following snippet in the new SynchronizationManager(driver).fluentWait(false).until(f -> {
elementCount.set(new ElementActions(driver, true).getElementsCount(locator));
expected.set(validation.getValue());
actual.set(elementCount.get() > 0);
// force validation type to be positive since the expected and actual values have been adjusted already
validationState.set(performValidation(expected.get(), actual.get(), ValidationEnums.ValidationComparisonType.EQUALS, ValidationEnums.ValidationType.POSITIVE));
return validationState.get(); Furthermore, the ReportManager.logDiscrete("Expected \"" + expectedValue + "\", and actual \"" + actualValue + "\"") Since the the lambda function in the Therefore, I suggest the following:
Note that I would like to contribute to solving this issue and I already created the progress bar code but need help in merging it with SHAFT. The following is a short video showing the idea of the progress bar. bandicam.2024-05-11.00-28-56-406.mp4 |
Dear @ahmednasr95 , this is the expected behavior for notExist , you are telling the engine to assert that an element not there so the engine waits the full timeout duration defined in the properties. If you don't need notExist to wait all duration |
And as i told you the issue of logging every 100 ms second is under investigation, For the idea of progress bar let us discuss it more with our technical committee |
I like the progress bar idea. And you seem to know already what you want to change. Would you kindly do a PR with your suggested changes? Do you need any help? |
@MohabMohie Yes, in order to do a PR I need a branch to work on or should I fork? |
You need to fork and create a new brach |
Problem Description
While using the validations
assertThat
andverifyThat
, it came to my attention that while the script is validating, I had the "feeling" that the script is stuck or not working as expected. However, when I waited for the timeout period , which is 60 seconds as default, the script continued and finished successfully.I guess that it would be better to show the user that the script is actually waiting to eliminate the "feeling" of the script being stuck.
Moreover, when the actual value of the assertion is true and the expected is false, the console continues to output the following message for the total waiting time: `[INFO] Expected "false", and actual "true" | com.shaft.tools.io.ReportManager - main - 06:16:44 PM ' as shown in the attached screenshot.
Solution Description
I guess it would be better to make the console output one of the following during the waiting time just to show that the console is waiting and to eliminate the "stuck script feeling":
Additional context
The text was updated successfully, but these errors were encountered: