1

I want to fill web form in bot way. I added the libraryclient-combined 3.0.0 beta 3 to the document .My firefox version should be most updated .

    import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class Selenium {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {



WebDriver driver=new FirefoxDriver();

driver.get("https://mail.google.com");
driver.findElement(By.id("Email")).sendKeys("yourEmailId");
driver.findElement(By.id("Passwd")).sendKeys("yourPassword");
driver.findElement(By.id("signIn")).click();

}

}

However , error comes out .

In my understanding , the seleniums 3.0 jar version should be along with geckodriver . Then ,i try to install geckodriver v10.0 here.

https://github.com/mozilla/geckodriver/releases

When I execute the geckodriver-v0.10.0-win64.zip , the installer can't be installed -only black window comes out .

What's wrong ?

enter image description here

REMARK: x64 window 10 version

Community
  • 1
  • 1
Vito
  • 299
  • 3
  • 19

2 Answers2

1

you can use marionette driver which i recently used. You need to download and rename it to wires.exe. you can download from the following link https://github.com/mozilla/geckodriver/releases

You need to add selenium-2.53.0 jar files.

below is the code you need to write.

System.setProperty("webdriver.gecko.driver", "G:\\ravik\\Ravi-Training\\Selenium\\Marionette for firefox\\wires.exe");
    WebDriver driver = new MarionetteDriver();
    driver.get("https://www.google.co.in/webhp?hl=en&sa=X&ved=0ahUKEwjdgc21jJHOAhVCvY8KHZ4aCdcQPAgD");
    System.out.println("marionette working fine....");
Ravi Potnuru
  • 191
  • 4
  • 13
  • where should be the program file and program name? I cant find the file location in program file – Vito Sep 21 '16 at 06:07
  • @ravik u mean just write the installation file location in the first line ,or it is the driver after installation program file location ? – Vito Sep 21 '16 at 06:09
  • System.setProperty("webdriver.gecko.driver", "Your file location along with wires.exe"); you no need to install anything. Just you can download the file and save it in your local system and then specify the path of the file in program as i mensioned. That's it. – Ravi Potnuru Sep 21 '16 at 06:51
  • appreciate if you can ans this http://stackoverflow.com/questions/39626759/how-to-continue-to-fill-the-data-in-next-page-by-selenium – Vito Sep 21 '16 at 21:20
1

To all those that are still confused:

What's wrong ?

Well, nothing is wrong, you just need to understand that geckodriver.exe is the driver itself, not an installer that will eventually install the driver on your machine.

So there are two steps you need to do in order to use (or let's say install) the driver:

  1. Unzip the folder on your machine (which you already did) and
  2. Add the driver executable path to test properties (the thing that Ravi pointed out)

Additional note: I use Intellij IDEA to run my tests, so I simply edit the test run configuration and add this line:
-Dwebdriver.gecko.driver="Path\to\my\geckodriver.exe"

Zaista
  • 1,272
  • 8
  • 18