Unable to open browser with specified URL using Selenium Webdriver - selenium-webdriver

Unable to open firefox browser with specified url in selenium webdriver. Only the browser is opening without the url.
Firefox version is 47.
Selenium version is 2.53.

There are two ways to solve your problem.
1- You can downgrade your firefox by reinstalling and select Never check for updates (not recommended: security risk) in your firefox by nevigate through
Open Menu->Options->Advanced.
2- if you want to working with current version of firefox which is 47 you should try with MarionetteDriver...by following this
If you have any problem with this let me know...:)

Related

Robot framework - Selenium - ChromeOptions "Prompt For Download" not working when downloading a file

I'm using robot framework with selenium for automating my web application.
I'm trying to open chrome browser and download a XML file and then parse it from the results folder ${OUTPUT_DIR}.
Every time I'm trying to download any file, chrome browser shows the windows prompt to download the file. I tried using the chrome options to disable the prompt, but it is not working. Please find the piece of code used to invoke chrome browser.
When tried using the regedit - PromptForDownloadLocation variable, it is working fine.. but I want to manage this using chromeOptions
Could you please help me with this.
ChromeDriver version : 79.0.3945.36
Robotframework - SeleniumLibrary version : 3.3.1
Create Webdriver and Open Browser
${CHROME_OPTIONS} = evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver
${prefs} = create dictionary download.prompt_for_download=${FALSE} download.directory_upgrade=${TRUE} download.default_directory=${OUTPUT_DIR} safebrowsing.enabled=${TRUE}
call method ${CHROME_OPTIONS} add_experimental_option prefs ${prefs}
create webdriver Chrome chrome_options=${CHROME_OPTIONS}

How to close firefox browser in selenium 3.0.1

Firefox : 50.0.1, GeckoDriver :13, selenium 3.01, IDE: Eclipse, Programming language : Java
Using below code :
System.setProperty("webdriver.gecko.driver","C:\\geckodriver.exe);
WebDriver driver = new FirefoxDriver();
driver.get("https://www.youtube.com/");
driver.close(); Or driver.quit()
In driver.close() the browser is not closed
In driver.quite() the browser is closed and Firefox crashed.
Getting Error: "plugin container for FireFox has stopped working."
Please let me know any solution
Steps you can try:
Uninstall any plugins in the Firefox browser.
Use the 64-bit version of geckodriver for 64-bit Firefox, similarly, 32-bit geckodriver for 32-bit Firefox.
I have tried the code in the same environment, and driver.quit worked for me. driver.close still not closing the browser.
You should always use driver.quit() when you want to close browser and not just one tab.
This exception you get is unfortunately known issue when quitting geckodriver firefox instance, see this links for details.
https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/7506
https://bugzilla.mozilla.org/show_bug.cgi?id=1027222
You can create a new firefox profile steps can be found here!
In your code use this new profile created.
WebDriver webdriver;
ProfilesIni profile = new ProfilesIni();
FirefoxProfile myprofile = profile.getProfile("myProfileName");
webdriver = new FirefoxDriver(myprofile);
Now webdriver.quit(); will close the firefox browser after the test has run.
This seems to be a problem with the geckodriver.
The workaround which worked for me was to install the older version of geckodriver, 0.20.1, which you can download here: https://github.com/mozilla/geckodriver/releases/tag/v0.20.1

Why Firefox is default browser for webdriver

We know that for firefox , driverserver.exe is not required while it is required for chrome or IE. Please help me to understand why Firefox is default Implementation of WebDriver.
From here - https://code.google.com/p/selenium/wiki/FirefoxDriver :
Firefox Driver
Firefox driver is included in the selenium-server-stanalone.jar available in the downloads. The driver comes in the form of an xpi (firefox extension) which is added to the firefox profile when you start a new instance of FirefoxDriver.
Firefox is baked in the jar file. It comes as a xpi, which is the extension of firefox . As soon as you instantiate the FrefoxDriver it gets added. See this

Website not running on Chrome and Firefox

I use data from localhost and REST API in my website. My website run properly on IE but in Chrome and Firefox CROS origin related problem occurs. I use Angular.js to create website. Please suggest how to solve these problem.
In Chrome above problem is solved by adding "allow cross origin *" extension.

Unable to open the Operamini browser in webdriver

i am unable t download the opera mini browser driver , like How we can follow the chrome browser. can u please provide the link . so its useful to work and open the browser.
Selenium webdriver don't support opera-mini (but I hope it will change.
For the moment if you want to test OperaMini on your computer for testing purpose you need to use MicroEmulator :
Installing Opera Mini on your computer
Good luck !
There is no OperaDriver exe to download( like for Chrome/IE).
You just need the Selenium jar file to instantiate opera driver instance. Please refer this link to get more details on Opera Driver

Resources