from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time
driver = webdriver.Firefox ()
driver.get ("https://www.baidu.com/")
print(driver.title)
driver.find_element_by_xpath("//*[@id="kw"]").send_keys("codeshelper")
driver.find_element_by_xpath("//*[@" Id= "su"]"). Click ()
time.sleep (3)
driver.find_element_by_xpath ("/ html/body/div [1] / div [5] / div [1] / div [3] / div [1] / h3) a"). Click ()
time.sleep (5)
driver.find_element_by_xpath ("/ html/body/div [4] / div/div/div [1] / div [2] / a [1]"). Click ()
driver.) Find_element_by_xpath ("/ html/body/div [4] / div/div/div [2] / div [4] / div [1] / div/a [2] / div [1] / h4"). Click ()