WebDriverException: Can only install from a zip file, an XPI or a directory

36 views
Skip to first unread message

sai

unread,
Jan 7, 2018, 9:52:02 PM1/7/18
to Selenium Users

Simple program to login to Gmail, using Selenium grid 2. 

I'm using Firefox 47, Selenium 2.53.1 jar,  on a  Mac OS and I just gave the path to the geckodriver file. So when I setup my hub and node, I get this exception ->


Exception: Can only install from a zip file, an XPI or a directory

What should I do for this? The Geckodriver is the latest, and I have unzipped the gecko driver and given the location in my node as follows ->

java -Dwebdriver.firefox.driver=/Users/sai/Desktop/Selenium/geckodriver -jar selenium-server-standalone-2.53.1.jar -role webdriver -hub http://localhost:4444/grid/register -port 5555 -browser browserName=chrome,maxInstances=3 -browser browserName=safari -browser browserName=firefox maxSessions=4


This is my program. 



@Test

public void testlogin() throws MalformedURLException

{

DesiredCapabilities cap = DesiredCapabilities.firefox();

cap.setBrowserName("firefox");

cap.setPlatform(Platform.ANY);

WebDriver driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"),cap);

driver.get("http://gmail.com");

driver.findElement(By.id("identifierId")).sendKeys("sai");

driver.findElement(By.cssSelector(".ZFr60d.CeoRYc")).click();

Reply all
Reply to author
Forward
0 new messages