Problem with Selenium 3.0 beta 1

2 128 visningar
Hoppa till det första olästa meddelandet

Ram Narayan

oläst,
30 juli 2016 06:59:412016-07-30
till Selenium Users
Hi All .

I wrote a simple code to open a URL in browser

package testNGBasicsPack;

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

public class Test {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
       
       
        WebDriver driver = new FirefoxDriver();
       
        driver.get("https://www.linkedin.com/");

    }

}

OP:

Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see https://github.com/mozilla/geckodriver. The latest version can be downloaded from https://github.com/mozilla/geckodriver/releases
    at com.google.common.base.Preconditions.checkState(Preconditions.java:199)
    at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:109)
    at org.openqa.selenium.firefox.GeckoDriverService.access$100(GeckoDriverService.java:38)
    at org.openqa.selenium.firefox.GeckoDriverService$Builder.findDefaultExecutable(GeckoDriverService.java:91)
    at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:296)
    at org.openqa.selenium.firefox.FirefoxDriver.createCommandExecutor(FirefoxDriver.java:244)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:219)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:214)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:210)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:123)
    at testNGBasicsPack.Test.main(Test.java:12)


Is there any big change in Selenium 3.0 ?

-Ram narayan

ramnarayan patro

oläst,
30 juli 2016 07:25:242016-07-30
till seleniu...@googlegroups.com
Using this

System.setProperty("webdriver.gecko.driver", "E:\\MyPath\\geckodriver-v0.9.0-win64\\geckodriver.exe");




--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/znOIbQ_bZXQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/0fea998c-3a2f-4c7a-9e17-df6d8db38895%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kamal Girdher

oläst,
1 aug. 2016 00:55:262016-08-01
till Selenium Users
This works for me.


    public static void main(String[] args) {
        System.setProperty("webdriver.gecko.driver",
                "C:\\Work\\WORK\\Selenium\\geckodriver.exe");
        DesiredCapabilities capabilities = DesiredCapabilities.firefox();
        capabilities.setCapability("marionette", true);
        WebDriver driver = new FirefoxDriver(capabilities);
        driver.get("http://www.google.com");

Manickam V

oläst,
4 aug. 2016 02:35:452016-08-04
till Selenium Users

hi kamal,

 how its possible i am ask to open without use geckdriver

Tell me your suggestions ..how to solve in FF browser ..i m not use geckdriver.only using webdriver to configue

FF using latest verson 3.0 betaaa

Manickam V

oläst,
4 aug. 2016 02:36:172016-08-04
till Selenium Users
hi Ram,,

  U got the solution regarding that code..Tell me why not support webdriver

same problem i am facing in FF..anyone clearly explain me..

Titus Fortner

oläst,
4 aug. 2016 02:58:572016-08-04
till seleniu...@googlegroups.com
Firefox 48+ will not work with the previous Firefox Driver. 
Selenium 3.0 defaults Firefox to use the new geckodriver.

If you don't want to use geckodriver, use Firefox <= 47 (or even better Firefox ESR) 
You can either stick with Selenium 2.53.x or you can use Selenium 3.0 and set capability for marionette to false.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

To post to this group, send email to seleniu...@googlegroups.com.

Manickam V

oläst,
4 aug. 2016 03:35:112016-08-04
till Selenium Users


hi sir


rechange my code and update mee ..

or send one sample code for FF browse using geckodriver ...

Manickam V

oläst,
4 aug. 2016 03:35:112016-08-04
till Selenium Users
public class Demo2 {

    public static void main(String[] args) {

 WebDriver driver = new FirefoxDriver();

  driver.get("http://www.google.com");
drvier.close();
}}

tis is my code ..now i am using FF 48 and selenium 3.0 ..i am facing error Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see https://github.com/mozilla/geckodrive


anyone guide me..to work with FF browser

Rocky

oläst,
7 aug. 2016 22:08:012016-08-07
till Selenium Users
Hi ,

I'm unable to execute this gmail login script . can somebody help me please ?

import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
public class Login1 {

public static void main(String[] args) {

WebDriver driver;
System.setProperty("webdriver.gecko.driver","E:\\geckodriver.exc");

DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability("marionette", true);
driver =new FirefoxDriver(capabilities);// Create a new instance of the Firefox driver
//WebDriver driver = new FirefoxDriver();
//System.setProperty("webdriver.gecko.driver","E:\geckodriver.exc");
//  Wait For Page To Load
// Put a Implicit wait, this means that any search for elements on the page
//could take the time the implicit wait is set for before throwing exception
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
// Navigate to URL
driver.get("https://mail.google.com/");
// Maximize the window.
driver.manage().window().maximize();
// Enter UserName
driver.findElement(By.id("Email")).sendKeys("UID");
// Enter Password
driver.findElement(By.id("Passwd")).sendKeys("PSW");
// Wait For Page To Load
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
// Click on 'Sign In' button
driver.findElement(By.id("signIn")).click();
//Click on Compose Mail.
driver.findElement(By.xpath("//div[@class='z0']/div")).click();
// Click on the image icon present in the top right navigational Bar
driver.findElement(By.xpath("//div[@class='gb_1 gb_3a gb_nc gb_e']/div/a")).click();
//Click on 'Logout' Button
driver.findElement(By.xpath("//*[@id='gb_71']")).click();
//Close the browser.
driver.close();
}
}


I'm using the latest version of selenium and eclips .

Thanks!

Aniket Mane

oläst,
8 aug. 2016 00:58:432016-08-08
till seleniu...@googlegroups.com

Use .exe instead of .exc


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/41261bff-9680-4157-b660-c683322ae9fc%40googlegroups.com.

Kriti Mansingh

oläst,
10 feb. 2017 07:34:372017-02-10
till Selenium Users
Hello Titus

Please help me know if we need to set capability for marionette to false with Selenium server v 3.0.1

and please help with sample code.
Thanks
Kriti

Titus Fortner

oläst,
13 feb. 2017 12:44:302017-02-13
till Selenium Users
Kriti,

You need to set marionette to false with Selenium 3 only if you want to use the legacy Firefox Driver with Firefox version < 48.
Svara alla
Svara författaren
Vidarebefordra
0 nya meddelanden