0

In a website I am testing using python, we have a "contact us" button, that should pop up an outlook email window ready to be sent. Its body should contain a certain text. Users should have outlook installed.

I want 3 things, but dont know how:

  1. To wait for the outlook email window to pop up

  2. Read the content

  3. Close the email window

Read about win32com.client, but not sure how to use it in this case

0m3r
  • 12,286
  • 15
  • 35
  • 71
ilya
  • 1
  • You're really testing the browsers handling of a certain type of link, this is a bit beyond what selenium was intended for. You want to look into a framework like AutoIT. You'll need to hook into the host OS and, this is likely out of scope for what you actually want to test. – DMart Mar 25 '20 at 16:19
  • Does it really pop-up specifically Outlook email window? I would rather expect just a `mailto:` link, which opens the email program (or even website like gmail) of user's preference. You could test this approach more easily – read the URL the app redirects to, check if it's a mailto link, and parse the text, subject... See [this question](https://stackoverflow.com/q/9067638/7292139) for more details on parsing – M. Volf Mar 25 '20 at 16:24
  • Yes, When user click on "contact us" button an outlook(currently) email box should be opened.I want to get and validate the text contained in it's body. How should I test that? – ilya Mar 25 '20 at 20:28
  • Can you post your current code please – 0m3r Apr 04 '20 at 05:34

0 Answers0