Pratibha
Pratibha

Reputation: 1786

Python3 - selenium - Chrome : keyword instead of URL

I am exploring Selenium with Chromedriver and Python 3.4. I got curious and tried to do following

from selenium import webdriver

driver = webdriver.Chrome()
driver.get("Cisco")

I gave a search keyword instead of URL to driver. It failed. I thought it will do a keyword search using google search engine. Am I doing something wrong?

I dont want to navigate to google.com and put keyword in search text box. How can I directly search the keyword?

Any help or guidance will be very helpful.

Upvotes: 0

Views: 103

Answers (1)

Tamas Hegedus
Tamas Hegedus

Reputation: 29926

Just navigate directly to the results page. Use:

driver.get("https://www.google.com/#q=Cisco")

Upvotes: 1

Related Questions