this post was submitted on 29 Aug 2024
11 points (100.0% liked)

Selenium Web Browser Automation

101 readers
4 users here now

Users forum for selenium browser testing. Do not advertise here.

founded 2 years ago
MODERATORS
 

I have automated tests that until the 27th of August worked flawlessly. my testcase goes to outlook web and confirms the receipt of an email. I am now stumbling over the login process. I am able to find the loginbutton but my selenium code fails to find the input fields.

i tried modifying the selection strategy but that made no difference.

I ran some basic javascript queries in the dev console but as best as i can tell the input field is visible, clickable and on top.

Does anybody have any idea what might be the issue?

top 5 comments
sorted by: hot top controversial new old
[–] dohpaz42 3 points 3 months ago (1 children)

I question why you’re testing receiving an email, when the process of receiving an email is completely out of your control. Additionally, as you can see, testing it using selenium is problematic because you are at the behest of the mail provider whenever they change their html.

If you insist on testing receipt of an email, it might be better to connect to the incoming mail server directly (via a socket connection) and look for the email that way — this even allows you to more easily test to ensure your headers are valid. Using POP or IMAP is a much more stable solution than scraping a web page.

But, in all earnest, ensuring the sending of an email should be sufficient enough, because that is something more within your control and is actually actionable on your end.

[–] bukkist 1 points 3 months ago (1 children)

I am well aware there are much easier (stable) means to do this but my manager has a bug bear about it. he wants it exactly as is.

[–] [email protected] 1 points 3 months ago

I am sorry that I cannot provide an answer for your question as I am not really super familiar with it (only briefly played around with it about 5 years ago), but I will say this might be a good time to play politics. If your manager is so adamant on a clearly worse solution, you might try getting some advocates on your side with some sway to influence your manager to change their mind. It could be well respected technical coworks, or, if your bold, your managers manager. That last one I recommend caution around as people can get vindictive when you go above them.

[–] LesserAbe 1 points 3 months ago (1 children)

Wish I could help more, I'm still stumbling around in my own efforts, but you could try adding a manual second or two delay. Doesn't seem like a good reason why it should make a difference but I've had it work.

[–] bukkist 1 points 3 months ago

I tried executing it in debugg mode, where i could step through the instructions. Even waiting minutes did nothing. Furthermore in console i can see that the element i want has its visible and clickable attributes set to true.