标签:attribute pat java window roc sel win .com port
from selenium import webdriver
import time
import os
path = os.path.dirname(__file__)
# print(path)
driver = webdriver.PhantomJS(executable_path=‘C:/Insert/phantomjs-2.1.1-windows/bin/phantomjs‘)
driver.get(‘http://pythonscraping.com/pages/javascript/ajaxDemo.html‘)
time.sleep(8)
print(driver.find_element_by_id(‘content‘).text)
driver.close()
问题 ‘Service‘ object has no attribute ‘process‘
其实就是你的浏览器可执行文件的路径没写对
标签:attribute pat java window roc sel win .com port
原文地址:http://www.cnblogs.com/xiaochun365/p/6275302.html