I have written a simple test case to open Firefox browser and go to "https://www.google.co.in". I am getting this error.
Test script
*** Settings ***
Library Selenium2Library
*** Test Cases ***
case1
Open Browser https://www.google.co.in/ ff
To Run in Firefox we need geckodriver. Place geckodriver in C:/python/scripts and then try to run the scripts.
To Run in Chrome, place chrome driver X32 in C:/python/scripts and then run your scrpts
you need download driver firefox first
Download Here
Searching for the error: "Selenium OSerror [Errno 8] firefox" in Google the first few results were quite informative and it seems to me that this was not done.
The first few options highlight that not the correct webdriver is installed. Example here. (A different error is presented when the Gecko driver is not installed).
In a follow-up result item an explanation was given that the script is missing a shebang: #!/usr/bin/env bash when a script is fired.
Check the browser version and browser operation system(32 bit or 64 bit) then install the driver put inside python installation directory.
For Example :
C:\Python27/yourinstalleddriver.exe
either
C:\Python27\Scripts/yourinstalleddriver.exe
Most of the links relate to chrome driver not firefox. Well I degrade my firefox version and selenium version and this was solved.
Related
I am new to Rselenium and I want to use it to scrape data from a website. When trying to establish a connection I get the error that my chrome driver is not compatible with my current browser version, here is the code and the error I got so far
library(RSelenium)
library(RCurl)
driver <- rsDriver()
remDr <- driver[["client"]]
remDr$open()
> remDr$open()
[1] "Connecting to remote server"
Selenium message:session not created: This version of ChromeDriver only supports Chrome version 97
Current browser version is 96.0.4664.45 with binary path C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
The error report is very long, but I think the essence of the error is described in the first sentence; my chromedriver and current version of chrome are not compatible.
So I did some research, since I don't know what a chrome driver is. I found out I can download older versions of chrome driver. I searched the 96.0.4664.45 version since my browser is that version (it seems there is only a 32 bit version, which I thought was odd but its the only one for windows so I downloaded that one).
After I downloaded the chromedriver.exe, I moved it to a specific folder and I added that folder to my system path as I read online this is what I have to do in order for R to recognize. Then, I used the cmd prompt to execute the chrome driver, which seems to work;
Then when I start up R and retry, I still got the same error, so it seems I am still doing something wrong. Do I need to 'overide' the chromedriver 97? And why do I even have a version 97 when my browser is a 96? Any help would be greatly appreciated.
I have a file right here: Library ../../MyLib/My_Lib.py, and I try to import the python file in RIDE, but RIDE still report "FAIL : No keyword with name '****' found", and this keyword is defined in the My_Lib.py, seems RIDE cannot find the python file.
I using python 2.7.8+Robot Framework 3.1.2+windows server 2012r2. I even selected Library -> Name -> Browse in RIDE, but the error still there and this whole robot test case folder is copied from another server which is working fine
Can anyone suggest what have I missed?
Ah! I have worked this out, if anyone else meets the same issue, you can click Tools->view RIDE Log, to see what's happening there. For my case, it's because I didn't install thrift but the My_Lib.py obviously used thrift module, so the My_Lib.py compile failed with "No module named thrift.Thrift".
Is it possible the Python library was created to work with Python 3.x.x leading it to not work on your Python 2.7.8? See https://wiki.python.org/moin/Python2orPython3
Check what python version is being run on the other server where the test is running fine. You might need to update your local Python version.
Also, you could try running the Robot test outside of RIDE just in case. You may do so by navigating to the test folder where the .robot file resides and running the following command:
robot test_file_name.robot
See if you get the same error that way. Please report back after doing the mentioned checks and we can continue debugging, my reputation doesn't let me comment on your question so I will just update the answer as we go along.
I'm trying to execute code on R with the package RSelenium to do some webscraping, but I'm blocked at the very first step. After loading the library, I try to run this line of code:
rmDr <- rsDriver(browser = "chrome", chromever = 'latest')
But the console returns :
Error in java_check() :
PATH to JAVA not found. Please check JAVA is installed.
Java is indeed installed on my computer, but I'm guessing the path isn't the one the package is waiting for. Does someone know where I could modify the path in the RSelenium package code so that I can run this?
To be noted, I'm working on a company computer and so I don't have every admin rights.
Thanks for your help!
You can use method "remoteDriver()" instead of "rsDriver()". I checked it today with the last stable version of selenium driver (3.141.59) and it works perfectly.
Here's the code sample:
library(RSelenium)
driver <- remoteDriver()
driver$open()
driver$navigate("https://www.google.com/")
Just got the same error, installed the latest Java Development Kit (JDK), restarted a machine and everything worked ok.
The best way to use RSelenium is to go through Docker.
I used this tutorial, https://rpubs.com/johndharrison/RSelenium-Docker, not a long time ago, all went smooth.
Besides, you need a debugger, you can not scrape without it. That's why this tutorial is a good idea.
Let know if anything goes wrong.
I've been trying to automate some basic stuff with Robotframework. Here is my configuration.
Python - 2.7.10
MAC High Sierra 10.13.2
Eclipse Oxygen with RED Editor
I've downloaded Geckodriver executable and put in under several places including usr/local/bin, folder on desktop
Here is what i've tried
Setup FFDriver Set Environment Variable webdriver.gecko.driver Users/[my username]/Desktop/geckodriver
Setup FFDriver Set Environment Variable webdriver.gecko.driver usr/local/bin/geckodriver
and my test
open browser http://www.google.com firefox
I've added usr/local/bin in PATH as well and still getting "geckodriver executable needs to be in PATH" error. The same happens with Chromedriver too. I am sure I must be missing something trivial here, can someone help me out please?
Launching the eclipse from command prompt, has fixed this issue. Yes, the PATH is not being inherited when launched from desktop icon.
when you use Python. the best shortcut you can do is, put you 'geckodriver.exe' file in pythons script folder. and set the Script folder path in you system path. this will resolve your problem.
I ssh into a remote linux sever from my Mac, and run gdbtui to debug a program. The source code displays, but the cursor line in the source code window frequently is not highlighted. I can enter commands such as 'next' and 'list' in the command line window, but the source code window doesn't redraw correctly. It sometimes shows lines in the source file out of order (the line numbers are displayed out of order.)
I have my TERM environment variable set to xterm-16color which vim is very happy to use. I'm at a loss as to what I should try.
gdb in ordinary command-line mode works fine.
Ideas?
What gdb version are you using? Try the latest one. At least gdb 6.5 had similar problems with tui mode.
I have the exact same configuration as you: I ssh into an Ubuntu server (currently 11.10) from a Mac and I'm currently experimenting with gdbtui.
I recommend that you use iterm2 as your Apple Terminal replacement. Besides 256 colors and a ton of other features, it seems to play decently with gdbtui (line highlighting is fine).