Selenium: Python webdriver common commands

I keep forgetting and having to look them up: // Find an element by CSS selector: driver.find_element_by_css_selector(“.canvas-placard.back .close”).click() // Assert DOM element not present (by CSS selector): self.assert_not_present(By.CSS_SELECTOR, “.canvas-placard.front”) // Assert true or equal, and at the same time get an attribute from a DOM element: self.assertEqual(“true”, driver.find_element_by_xpath(“//select[@id=’type’]”).get_attribute(“disabled”)) // Sending stuff to input fields: self.driver.find_element_by_css_selector(“.myselector”).send_keys(“The […]