小编Dev*_*vin的帖子

Selenium with PhantomJS:Yahoo登录表单未提交(Python绑定)

我正在OS X上使用selenium webdriver编写一个python 2.7脚本来登录Yahoo fantasy体育并自动执行某些操作.

该脚本适用于webDriver Firefox和Chromedriver.我最近开始使用PhantomJS(GhostDriver),我发现我无法让PhantomJS Selenium Driver(GhostDriver)登录到Yahoo登录表单.

#!/usr/bin/python
import time
from selenium import webdriver
from selenium.webdriver import PhantomJS
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from sys import argv
import click

@click.command()
@click.option('--days', type=int, prompt='Number of days to set active lineup', help='Number of days to set active lineup')
@click.option('--username', prompt='Your Yahoo username:', help='Your Yahoo account username')
@click.option('--password', prompt='Your Yahoo passwordname:', help='Your Yahoo account password')
def start_active_players(days, username, …
Run Code Online (Sandbox Code Playgroud)

python selenium webdriver phantomjs ghostdriver

2
推荐指数
1
解决办法
2900
查看次数

标签 统计

ghostdriver ×1

phantomjs ×1

python ×1

selenium ×1

webdriver ×1