i use selenium get web page and i send kenword get a new page. but how can i get the new web page ,and search the information that i need
browser = webdriver.Chrome()
test_url = 'https://www.baidu.com/'
browser.get(test_url)
in_put = browser.find_element_by_xpath('//*[@id="kw"]')
name = 'python'
in_put.send_keys(name.decode())
button = browser.find_element_by_xpath('//*[@id="su"]')
button.click()
page = browser.page_source
with open('baidu.html','wb') as f:
f.write(page)
Forgive me for not using markdown. My question: i want to get the web page after search keyword, but i write browser.page_source , it is the Baidu's home page