test-phantomjs.py 326 B

1234567891011121314
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. '''
  4. @Auther :liuyuqi.gov@msn.cn
  5. @Time :2018/4/11 15:31
  6. @File :test-phantomjs.py
  7. '''
  8. from selenium import webdriver
  9. print(0)
  10. driver = webdriver.PhantomJS(executable_path='D:/Program-Files/-2.1.1-windows/bin')
  11. print(1)
  12. driver.get('http://www.baidu.com')
  13. print(2)
  14. print(driver.title)