I am running some tests where I have to restart a server by clicking a "restart" button. There is a small text being displayed near to it which will show the status of the server.
Before clicking the "restart" button, the text shows "running" and after clicking it, the whole web page keeps loading and the text shows "restarting". After the page stops loading, the server successfully starts running again and the text shows "running".
I have to write a test case which checks if the text shows "restarting" when the "restart" button is clicked. But unfortunately I am not able to find a way to make the selenium check if the text is showing "restarting" as it is unable to do anything since the webpage is loading at that time.
Can anyone help me out by showing me a way how to make selenium run when the webpage is loading? I am not getting good replies in google search about this. It will be great if someone can help me out.
Thanks