1

I'm having an issue when I'm going to send data in text field. I got an exception.

I'm using Firefox version 54.0b1 (32-bit) and Selenium 3.3.1.

driver.findElement(By.xpath(".//*[@id='email']")).sendKeys("Test");

The exception:

Exception in thread "main" org.openqa.selenium.InvalidArgumentException: Expected [object Undefined] undefined to be a string

1
  • 1
    Can provide some more information as: 1. What are your testing steps? 2. What have you tried so far? Show code. 3. What worked for you? 4. Where are you stuck? Commented Apr 25, 2017 at 7:39

2 Answers 2

1

you need to download the latest gecko driver for Mozilla Firefox 54.x and Selenium 3.x.

Also provide accurate path as follows:

        System.setProperty("webdriver.gecko.driver", "C:\\directory\\geckodriver.exe");
        WebDriver driver =  new FirefoxDriver();
        driver.manage().window().maximize();
        driver.get("http:\\yoururl.com");
        driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
        driver.findElement(By.xpath(".//*[@id='email']")).sendKeys("Test");

Hope it will work for you.

Sign up to request clarification or add additional context in comments.

4 Comments

Raj its not working its still same issue and exception.
Try this line in your code: System.setProperty(FirefoxDriver.SystemProperty.DRIVER_USE_MARIONETTE,"false");
Its still not working raj i think couple of days before i have changed my window 8 to windows 10 may be its big cause for this issue >??
OS does not cause to this kind of issues...... You can give another try by downgrading the Firefox version.
0

This is actually a Firefox issue and issue have been recorded. Go through the below link for more info

https://bugzilla.mozilla.org/show_bug.cgi?id=1357661

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.