Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I researched this as much as I could on my own but came to no clear conclusion to my question. I've been teaching myself automation testing via Python + Selenium, I'm as new or n00b as it gets so bare with me. I've come across this line in some of my tutorials:

self.assertIn but more like this, self.assertIn("Python", driver.title) and I've also seen it like this (simple use, not in unittest) assert "Python" in driver.title

... so far I've been able to grasp the tutorials, at least where my progress has taken me but I do not understand the function of this driver.title. Any help would be much appreciated.

Thanks in advance for your time.

share|improve this question

It is getting the title of the web page and seeing if it has Python in it.

How much HTML do you know?

share|improve this answer
Thank you for your comment, Phil. I know a bit of HTML, actually although python and selenium are very new to me. Does the title in the test have to match word-for-word the title in the browser? Thank you for your input. – フレヂィ Feb 28 '14 at 18:52
Also, what is the best place to find a complete or extensive guide to syntax. I've read through these links link and link but they just don't seem to have a complete library to read through, or maybe it's just my initial ignorance into this venture. – フレヂィ Feb 28 '14 at 18:58
See this thread for different ways of using the title - contains or exact -… – Phil Kirkham Feb 28 '14 at 20:03
Did you look here - and links from here - for basic webdriver info? – Phil Kirkham Feb 28 '14 at 20:04
Thank you again, Phil. I guess it's just eagerness on my part. Wanting to take it all in. I forgot that the journey is just as important as the end. – フレヂィ Feb 28 '14 at 21:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.