Selenium Java Python Test If Substring