I have just started to study selenium for automatic testing over the past few days, and I am really hung up on it. I was looking for documentation on this, but I didnโt find anything useful, but perhaps one of you has found something interesting if I would like to read it.
In any case, there is a problem: I need to open a site. This website accepts some parameters that transfer the browser to another site, however, if the parameters are invalid, the message "Error occurred" will appear on the next site.
If the second site does not give an error, we want to save several arbitrary values โโand repeat them later. If the site makes a mistake, we want to note the mistake and move on. Right now, if the second site is invalid, selenium is stopped.
The only way to do this is to have an if-else statement, although I have not found a mention of one in selenium. I read somewhere that you can create javascript yourself and then inject it into selenium. The problem is that I don't know how to actually introduce javascript in selenium.
Hope this wasn't too weird.
Thank,
Jesse Montermon
source
share