Encountering org.openqa.selenium.firefox.NotConnectedException while using Selenium Java 3.0.1 with Firefox version 51.0.1

Encountering org.openqa.selenium.firefox.NotConnectedException while using selenium java 3.0.1 with firefox version 51.0.1.

Attempting to utilize the Gecko driver.

This is my code

public class Gecko {
   String driverPath = "/home/hema/Downloads/Softwares";
   WebDriver driver;

   @org.junit.Test
   public void Test() {
     System.setProperty("webdriver.firefox.marionette", driverPath + "/geckodriver.exe");
     DesiredCapabilities capabilities = DesiredCapabilities.firefox();
     capabilities.setCapability("marionette", true);
     driver = new FirefoxDriver(capabilities);
     driver.get("http://awsstagewebdriver.doctorinsta.com");
  }
  @After
  public void tearDown(){
    driver.close();
  }
}

Dependencies

<dependencies>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-server</artifactId>
        <version>3.0.1</version>
    </dependency>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>3.0.1</version>
    </dependency>
</dependencies>

Answer №1

Could you kindly assist with reverting the Firefox version from 51.0.1 to 46.0.1?

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Finding element in the HTML document using parent element's xpath in Selenium

I'm having trouble selecting a checkbox within a table td element using Selenium. The xpath locator I am currently using is "//*/td/a[contains(.,'Samsung Galaxy Note 10.1')]//parent::td[last()]/input[@type='checkbox']". I want to b ...

What is the most concise way to write this Xpath?

How can I retrieve the attribute value of an element using an absolute path like this: //*[@id="main"]/div[3]/div/div/div[3]/div[23]/div/div/div[1]/div/div/span/img I would like to know how to write code in relative xpath. Can you provide guidance on that ...

Uncovering hidden links in a menu with Python Selenium and JavaScript

Can someone provide guidance on how to activate the JavaScript submenu associated with this button, "x-auto-54"? <table id="x-auto-54" class=" x-btn avtar-x-btn x-component x-btn-noicon x-unselectable " cellspacing="0" role="prese ...

Using Selenium to modify the sorting of Google Maps reviews

I am encountering a fascinating issue with my **Web Scraping** project. My goal is to retrieve the latest **Google Maps reviews**. I specifically need to arrange the reviews based on their date of posting. Although most tutorials I've come across a ...

Error: Unable to locate elements due to a null XPath expression. This issue arises while attempting to input keys using a Method

Encountering an error when using Sendkeys in methods. public static void inputTask(String task) throws Exception { // Entering task name GUIFunctions.typeTxtboxValue(driver,By.xpath(ObjRepoProp.getProperty("inputTaskName_XPATH")),task); Thread ...

The command driver.quit() triggers an error in Firefox, causing the browser to crash

When the driver.quit() method is called, it causes Firefox to stop working. Although the tests do not fail, every time driver.quit is executed, the browser crashes as seen in the image below. This is my code snippet: public void quitDriver() throws E ...

Guide on utilizing sendkeys for interacting with child windows in Salesforce with Selenium WebDriver

How can I use the sendkeys method on a search textbox located in a child window shown in these screenshots? I have successfully identified the URL and title of the child window, however, whenever I attempt to perform click or sendkeys actions in the child ...

update confirmed data from a record

I am facing a unique challenge, where I have an edit form that updates a record in a table. One of the fields, let's say username, needs to be unique. To validate this, I am using the jQuery validation plugin along with the remote method as shown belo ...

Ways to Provide Dynamic Input in Xpath

Welcome to my blog with my very first question here! I am currently working on Selenium automation with C# and have encountered an issue. I need to click on a checkbox that is not static and the ID keeps changing. To handle this, I have decided to use XPA ...

How can I choose the third option on this webpage using PHP webdriver?

Looking for a way to select the third option labeled Off (optional) from the following HTML using Selenium PHP-webdriver. Can anyone help me with this? In this particular HTML snippet, all ids are dynamically generated, making it impossible to use ids to ...

Navigating through frames in Selenium can be a bit tricky,

I am having trouble logging into this website. Upon loading the page, a frame appears. I have attempted to switch to the frame without success. public void logon(String Username,String Password,String trns) { Configuration.driver.get(Configuration.U ...

Capturing selenium screenshots and showcasing them on a tkinter graphical user interface (GUI

I'm attempting to capture a screenshot of a page using selenium and display it on a canvas in my tkinter interface. However, I keep encountering the following error: TypeError: __str__ returned non-string (type bytes) Here is the code snippet. Any a ...

Is there a way to extract job listings from https://apply.workable.com/caxton using Selenium and Python?

I need your advice on how to scrape job listings from a specific website, using Selenium and Python. The website in question is: While attempting this task, I encountered an issue with accessing the <li> tags within the <main> tag of the websi ...

How to initialize an enum in Java using Gson

Take a look at this piece of code: public class MyClass { public static enum MyEnum { ENUM_A("This is option A"), ENUM_B("This is option B"); private String description; private MyEnum(String desc) { this.description = desc; } ...

Guide on efficiently writing several data entries to Excel using looping in Jxl

I am facing an issue with my code where it is only writing the first value to Excel and not the rest. My goal is to read data from a webpage and write it to an Excel sheet. The current set of code I have works fine, but I need help figuring out how to run ...

In Java with Selenium, I used the command list.clear() to empty the list that was previously storing the result I was trying to keep in a

As I attempted to store country and state values in a map with key-value pairs while looping through each country to obtain the list of states, I encountered an issue. Every time I selected a new country, I tried to clear the existing list using list.cle ...

Error encountered: The method WebElement.click of <selenium.webdriver.firefox.webelement.FirefoxWebElement has failed to execute

Recently, I created a Python script that automatically logs into my email account and sends messages. It was working fine after testing, but then I decided to make some changes to simplify it - like adding one-liners and reducing the number of local variab ...

Deactivate the @Test using Annotation Transformer

Within my program, I have two classes: page1 and page2. In page2, I need to access a variable from page1 that will randomly be assigned the value of either "Internal" or "External". Based on this value, I want to decide whether or not to execute certain @t ...

Troubleshooting sending keys with Selenium WebDriver in Python has been a challenge for me

Attempting to run a simple test: from selenium import webdriver from selenium.webdriver.common.keys import Keys driver = webdriver.Firefox() driver.get('http://google.com') driver.find_element_by_name('q') driver.send_keys('hey&a ...

Is there a way to convert a flat JSON into several instances of a sub-class through deserialization?

Here is a flat JSON string that needs to be deserialized in Java using Jackson: {"ccy":"EUR", "value1":500, "value2":200, "date":"2017-07-25", "type":"", ... <many other pairs>} To deserialize this JSON string, we can create the following ...