Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ca44705

Browse files
committed
use print function
1 parent f676b57 commit ca44705

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

source/faq.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ Another way to find content type is using the `requests
7171
<http://python-requests.org>`_ module, you can use it like this::
7272

7373
import requests
74-
print requests.head('http://www.python.org').headers['content-type']
74+
content_type = requests.head('http://www.python.org').headers['content-type']
75+
print(content_type)
7576

7677
Once the content type is identified, you can use it to set the firefox
7778
profile preference: ``browser.helperApps.neverAsk.saveToDisk``

source/navigating.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ drop down, and you can use "setSelected" to set something like an
8080
element = driver.find_element_by_xpath("//select[@name='name']")
8181
all_options = element.find_elements_by_tag_name("option")
8282
for option in all_options:
83-
print "Value is: %s" % option.get_attribute("value")
83+
print("Value is: %s" % option.get_attribute("value"))
8484
option.click()
8585

8686
This will find the first "SELECT" element on the page, and cycle
@@ -241,4 +241,4 @@ domain that the cookie will be valid for:
241241
# And now output all the available cookies for the current URL
242242
all_cookies = driver.get_cookies()
243243
for cookie_name, cookie_value in all_cookies.items():
244-
print "%s -> %s", cookie_name, cookie_value
244+
print("%s -> %s", cookie_name, cookie_value)

0 commit comments

Comments
 (0)