Selenium - find_element e find_elements By
This commit is contained in:
@@ -62,5 +62,9 @@ if __name__ == '__main__':
|
||||
search_input.send_keys('Hello World!')
|
||||
search_input.send_keys(Keys.ENTER)
|
||||
|
||||
results = browser.find_element(By.ID, 'search')
|
||||
links = results.find_elements(By.TAG_NAME, 'a')
|
||||
links[0].click()
|
||||
|
||||
# Dorme por 10 segundos
|
||||
sleep(TIME_TO_WAIT)
|
||||
|
||||
Reference in New Issue
Block a user