Find element by class name python. Driver.findelement(by.xpath()).click();. contains text xpath. nosuchelementexception. find_element(by, xpath).get_text.