I am currently working on a project where I am integrating the Selenium Webdriver with the Chrome implementation in Javascript. The project involves testing a simple quantity input form, and I am struggling with a particular aspect of it. My challenge lies in retrieving the value entered using the sendKeys function and then printing a message based on that value.
If the input value exceeds 100, I want to display "Exceeds 100".
If the input value is less than 0, I want to display "Below 0".
If there is no input value, I want to display "No input".
The test successfully enters new values into the form, but my issue is capturing the value and displaying the corresponding message. Despite trying various approaches, I have found limited documentation on this specific issue. I have provided a link to my code below for reference, and I welcome any suggestions or insights you may have as this problem has me perplexed.
Furthermore, I am curious if assertions can be utilized to address this concern...
Test File Link:
https://gist.github.com/anonymous/89a84dbc15ba4088719400be1f359045