硒的驱动因素不起作用

时间:2017-12-24 00:38:27

标签: python selenium selenium-chromedriver qa

对此非常陌生,我无法让chromedriver或geckodriver工作。它们都位于public class CustomConfigurableJoint : MonoBehaviour { protected ConfigurableJoint configurableJoint; protected virtual void Awake() { //Create it configurableJoint = gameObject.AddComponent<ConfigurableJoint>(); //Modify it below configurableJoint.xMotion = ConfigurableJointMotion.Limited; configurableJoint.yMotion = ConfigurableJointMotion.Limited; configurableJoint.zMotion = ConfigurableJointMotion.Limited; configurableJoint.angularXMotion = ConfigurableJointMotion.Locked; configurableJoint.angularYMotion = ConfigurableJointMotion.Locked; configurableJoint.angularZMotion = ConfigurableJointMotion.Locked; } } 。所以我知道他们在PATH。

我的代码:

/usr/local/bin/

我回来了:

from selenium import webdriver

driver = webdriver.Chrome('/usr/local/bin/chromedriver')  
driver.get('http://www.google.com/xhtml');

1 个答案:

答案 0 :(得分:0)

您必须传递ChromeDriver的绝对路径以及 Attribute Key ,如下所示:

from selenium import webdriver

driver = webdriver.Chrome(executable_path='/usr/local/bin/chromedriver')  
driver.get('http://www.google.com');