Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

1 like 0 dislike
3.9k views
by
My code

----------------

package com.pom.pages;

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

public class LoginPage {
    
    public static void main(String[] args) {

    //// declaration and instantiation of objects/variables
        System.setProperty("webdriver.gecko.driver","D:\\rs\\Softwares\\selenium_SW\\Sel_3.0.1\\geckodriver-v0.11.1-win64\\geckodriver.exe");
    WebDriver driver= new FirefoxDriver();
    
    String baseurl = "http://www.indeed.co.in/?r=us";

    // launch Firefox and direct it to the Base URL
    
    driver.get(baseurl);
    }
}
 

-----------

error

-----------------

1477747810534    geckodriver    INFO    Listening on 127.0.0.1:7773
Oct 29, 2016 7:00:10 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end
1477747811163    mozprofile::profile    INFO    Using profile path C:\Users\initech\AppData\Local\Temp\rust_mozprofile.ydzPvvW6Wi0q
1477747811230    geckodriver::marionette    INFO    Starting browser C:\Program Files (x86)\Mozilla Firefox\firefox.exe
1477747841403    geckodriver::marionette    INFO    Connecting to Marionette on localhost:49267
1477747842216    addons.xpi-utils    ERROR    Failed to write add-ons list to profile directory: [Exception... "Component returned failure code: 0x8052000e (NS_ERROR_FILE_IS_LOCKED) [nsIFile.moveTo]"  nsresult: "0x8052000e (NS_ERROR_FILE_IS_LOCKED)"  location: "JS frame :: resource://gre/modules/addons/XPIProvider.jsm -> resource://gre/modules/addons/XPIProviderUtils.js :: this.XPIDatabase.writeAddonsList :: line 1525"  data: no] Stack trace: this.XPIDatabase.writeAddonsList()@resource://gre/modules/addons/XPIProvider.jsm -> resource://gre/modules/addons/XPIProviderUtils.js:1525 < this.XPIProvider.checkForChanges()@resource://gre/modules/addons/XPIProvider.jsm:3657 < this.XPIProvider.startup()@resource://gre/modules/addons/XPIProvider.jsm:2622 < callProvider()@resource://gre/modules/AddonManager.jsm:227 < _startProvider()@resource://gre/modules/AddonManager.jsm:755 < AddonManagerInternal.startup()@resource://gre/modules/AddonManager.jsm:938 < this.AddonManagerPrivate.startup()@resource://gre/modules/AddonManager.jsm:2773 < amManager.prototype.observe()@resource://gre/components/addonManager.js:57
1477747842991    Marionette    INFO    Listening on port 49267
Oct 29, 2016 7:00:46 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
by The go-to Tester (181 points)
Is your execution stuck?

1 Answer

0 like 0 dislike
by The go-to Tester (181 points)
It looks like you have installed some plugin or add on in firefox which is preventing execution. Kindly remove any other plugin apart from flash player and firebug.

 

I suspect that plugin with antivirus is preventing the execution.
by The go-to Tester (181 points)
I see that you're using 64 bit version of geckodriver. Also, try with 32 bit geckodriver.

Open performance monitor and end existing process of firefox.
by The go-to Tester (181 points)
Hope that helps.


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

1.4k questions

1.6k answers

866 comments

1.9k users

...