Tool which will record my browser actions and allow me to execute the recorded actions from code
I am first time trying out automated web UI testing. I just tried writing selenium python code which logs in to the website, waits till it redirects to target page and then tries to fetch certain information from that target page. I am facing several issues. For example I am getting
TimeoutExceptionwhen using headless chrome and I am not able to access properties of selected element on the target page. Also, I believe I might have to revise this function some times in future as the target website might change the UI/UX. So, I was thinking if I should use some tool which will allow me to use browser and capture my action as I do it and generate the script for my action, so that whenever the UI/UX of the target site changes, I will just have to redo action, recapture it in that tool and use the script generated. I just want to avoid time I am wasting in thinking and coding how I can imitate the actions myself. I have several such actions targetting different sites. So to reduce overall developement time I want to know if any such tool is there.
There are a number of different click and record applications out there that will then convert the process into code (of varying levels). How good they are at this often depends on how large a premium you're willing to pay in price, or other limitations.
Telerik's Test Studio
They often sound like a saving of time, compared to manually writing your framework, however can rapidly be the opposite once you've built up a large number of test cases.
You're proposing that you'll be able to quickly re-record tests when something changes, which on one hand sounds sensible, yet the reality is that this can rapidly become unmanageable.
Imagine you have 300 tests that check various areas of the software. If one core part changes stopping all of them from working will you re-record all 300? Have you saved any time having automation if you are having to constantly remake every test for every change?
The above example can be mitigated in some of the more professional (paid for) software IDEs as you can link recording together, however it can still very quickly become a minefield.
You'll also find that especially with the paid for IDEs there will be something, a 'catch' designed to limit what you can do until you pay more. Often this will be something like how many tests you can run simultaneously (having to purchase additional runners / etc to carry out more than one at once).
Timeout Exception Query: What do you have set for the timeout?
e.g. try specifying it if you've not already:
EDIT - Noticed you mentioned you're writing in Python, and I gave Java example
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); driver.manage().timeouts().pageLoadTimeout(10, TimeUnit.SECONDS);
I below think would be correct for Python?