Currently, I am facing a challenge in testing a webpage using Selenium which has been developed using AngularJS. This particular webpage contains text fields that users need to fill out. As the user starts typing in these text fields, AngularJS captures each keystroke and displays a live preview similar to how a preview is generated while filling out a question on StackOverflow.
Despite my efforts, I have not been successful in testing this functionality. I have attempted to use various Selenium commands such as type, typeKeys, as well as mouseDown and mouseUp followed by typeKeys to simulate user typing. However, it seems like the event handlers are not being triggered, preventing the desired outcome. I believe that I need to simulate the typing behavior of a human in order to trigger the events effectively, but my current approach doesn't seem to be working.
<tr>
<td>mouseDown</td>
<td>name=appName</td>
<td></td>
</tr>
<tr>
<td>mouseUp</td>
<td>name=appName</td>
<td></td>
</tr>
<tr>
<td>typeKeys</td>
<td>name=appName</td>
<td>foobar</td>
</tr>
If there is a JavaScript solution available, I am open to exploring that as well. I appreciate any assistance provided. Thank you.