This question already has answers here:
WebDriverException: unknown error: cannot find Chrome binary error with Selenium in Python for older versions of Google Chrome
(8 answers)
Closed 3 years ago.
First, I have a chrome browser v75(this is the one I use every day). And I download an old version(v61.0) with which I want to deploy selenium crawler.
But the question is each time when I try to run this crawler. It always executes the v75 version rather than v61.0
I have downloaded their corresponding chromedriver and configured them already.
My first trial is to specify the headers which tell the browser version.But it doesn't work.
So should I write some script to add them to the system path?
PS:I want to run this in a virtual environment and I'm using Mac.
Just add the below chrome option as part of options.
Here is the solution in Python:
# replace the path with the location where you have older version of chrome.exe
chrome_options = Options()
chrome_options.binary_location= "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"
# load the options
driver = webdriver.Chrome(chrome_options=chrome_options)
Related
I'm using the GTK3 and compiling under both Linux and Windows (with Mingw64), and I'm having a problem with the GtkLinkButton. I set a URI in my program and it works fine under Linux, but when I run it under Windows and click on the button nothing happens.
I've found the following documentation for gtk_show_uri_on_window, which does the actual work for GtkLinkButton:
This is a convenience function for launching the default application to show the uri. The uri must be of a form understood by GIO (i.e. you need to install gvfs to get support for uri schemes such as http:// or ftp://, as only local files are handled by GIO itself).
Presumably this means I need to install GVFS under Mingw64. However saying pacman -Ss gvfs doesn't find any packages.
Is there a way to get URLs to work in GTK when running on Windows?
After doing some digging I found this question with a number of answers. It seems that the Right Thing is to copy the following executables into my application bin folder:
gspawn-win64-helper.exe
gspawn-win64-helper-console.exe
Not able to find Cypress.exe file in latest Direct download older from cypress.io
Steps to Reproduce:
1) visit Cypress.io website and click on direct download link (IM using Windows OS)
2) Cypress.zip will get downloaded
3) unzip as regular process into destination folder
4) open Cypress Folder and we can see cypress.exe file which will open Cypress tool.
Actual Result: Latest version downloaded but when unzipped package, not able to find cypress.exe file. Its getting extracted as cypress.app folder and not as executable file.
Expected Result: There should be some file to launch cypress tool
I noticed that earlier today as well.
Maybe the direct download OS version checker isn't working correctly? Dunno.
You can however download a specific version via a direct url
So ie. for version 3.2.0 for windows you would use
https://download.cypress.io/desktop/3.2.0?platform=win
Installing Cypress
I'm trying to use Watir gem for writing scripts in ruby but the following code gives an error:
browser = Watir::Browser.new :chrome
Error:
Selenium::WebDriver::Error::UnknownError: unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.31.488774 (7e15618d1bf16df8bf0ecf2914ed1964a387ba0b),platform=Mac OS X 10.12.5 x86_64)
Please let me know the solution to the above issue.
Remember,
You also need to have chrome installed on the machine in order for Selenium Chrome Driver to work.
There may be some libraries which the the version of chromedriver you're trying to install depends on. You need to install these libraries to start chromedriver.
How did I solve this?
I SSH'd into my testing environment and ran chromedriver (I am using the latest version at the time of this answer: 2.35 on Ubuntu Trusty 14.04)
chromedriver: error while loading shared libraries: libnss3.so: cannot open ...
This is the Network Security Service library. Other versions may require some other libraries to be installed. Checkout this answer for more on this.
So I installed the library using apt-get.
p.s: Make sure you have Chrome installed in the box too. If you're using CircleCI, checkout this tip.
This means that your script is unable to find the Chrome driver browser executable. Make sure that you have downloaded the Chrome browser from here. Additionally, from the ChromeDriver Capabilities docs,
Path to the Chrome executable to use (on Mac OS X, this should be the actual binary, not just the app. e.g., '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome')
The solution is to add the location of the Chrome or Chromium app to your PATH. You likely tried to organize the apps on your Mac and did not put Chrome directly in the Applications folder.
However it came to be, the folder containing the Chrome or Chromium .app is not in your PATH. To remedy it, edit your ~/.bash_profile and add a line such as:
export PATH="$PATH:/Applications/Web"
In this example, I have put all of my browsers in a folder called "Web" inside of Applications.
The more technical explanation is that chromedriver searches for a specific subpath within each entry in your PATH. The code that does it is here:
Chromedriver Source Code
I am unable to run the mathematica-netlogo link on my PC with a 64 bit processor running window 10. The versions of Netlogo and Mathematica are 6.0.1 and 11.1 Student Edition respectively.
The error arises when the function "NLStart[]" is run with the path of the Netlogo directory provided as an input to this function. The error message is as follows:
NLStart::netlogonotfound: NetLogo could not be found in: C:\Program Files\NetLogo 6.0.1\
Prior to this step, I successfully loaded the NetLogo Mathematica link package.
Any helpful suggestions to overcome this issue will be appreciated.
Thanks.
I've just verified I was able to use NetLogo Mathematica Link with the following configuration:
Mathematica 11.1.0.0
NetLogo 6.0.1 64-bit
Windows 10 64-bit
My Mathematica installation was untouched, as was my NetLogo installation - I did not have the Mathematica Link 6.0 hotfix installed for NetLogo 6.0.1. Also, NetLogo 6.0.1 was installed in "C:\Program Files\NetLogo 6.0.1" (some users choose to install to a different directory, or their primary drive is not lettered with "C:").
I opened Mathematica and ran the following commands:
File > Install > type: Package, source: From File, file: C:\Program Files\NetLogo 6.0.1\Mathematica Link\NetLogo.m, install name: NetLogo, install for this user only. Note that when selecting this file, Mathematica will use the last directory you opened, so when the file dialog opens, first navigate to the the top of the drive then navigate down to NetLogo 6.0.1 (using a NetLogo.m file from an older NetLogo version will almost certainly break Mathematica link, and this is a very easy mistake to make).
Entered in the notebook (cannot code block this): <<NetLogo`
Entered in the notebook: NLStart["C:\\Program Files\\NetLogo 6.0.1"] (note the double backslashes and no trailing backslash).
The NetLogo window will open after a slight delay (depending on your system speed and memory)
If you've followed these steps and are still unable to open Mathematica Link, please comment and we can continue to troubleshoot.
Edit:
I wanted to consolidate troubleshooting steps for future readers. I've introduced a new version of NetLogo.m available here, which users should download for troubleshooting purposes (it will be distributed with future versions of NetLogo). Some steps to using this:
Mathematica will cache old "NetLogo.m" files. You can find where these caches are by using the following commands in Mathematica:
FileNameJoin[{ $BaseDirectory, "Applications" }]
FileNameJoin[{ $UserBaseDirectory, "Applications" }]
Visit the directories obtained in Step 1 and delete all "NetLogo.m" files from them.
Download the new version of NetLogo.m
Install the downloaded version of NetLogo.m (and run <<NetLogo`)
Run NLDiagnostics["C:\\Program Files\\NetLogo 6.0.1"] to determine what paths are being searched. This function will produce a hash as an output. The key missingJars should be an empty list ({}).
If you want to check java version, you can run NLJavaDiagnostics[]. The javaVersion returned should start with "1.8.0", the javaArchitecture returned should be "64".
I have installed vim in windows and would like to configure it so i can send code to R. I want to also use Sweave with it. However, i have Googled and failed to find clear step-by-step instructions on how to set this up.
my attempts so far:
installed Vim using executable from ftp://ftp.vim.org/pub/vim/pc/gvim73_46.exe
downloaded R-plugin from https://github.com/jcfaria/Vim-R-plugin/zipball/master and extracted it to a folder on my pc. following instructions in the r-plugin.txt file, i installed python-3.2.msi and pywin32-216.1.win32-py3.2exe. I extracted the plugin zip-file to C:\Program Files (x86)\Vim\vimfiles\ merging like-named folders together. then i opened Vim and typed :helptags C:\Program Files (x86)\Vim\vimfiles\doc. I closed Vim then I started R and reopened Vim. I typed :new anewfile.R and got the error message
"Python interface must be enabled to run Vim-R-Plugin. Please do ':h r-plugin-installation details
and when i type this i get
error149, no help for r-plugin-installation
I also did not see the buttons that send code to R.
I failed to understand the instruction that , "You may have to
adjust the value of |vimrplugin_sleeptime|."
What should i do?
-I already have Miktex 2.9 on my PC. will Vim see it? How do I set up Vim to see Latex?
Will appreciate any help.
Note: I have used rstudio with Sweave and also eclipse but there are some issues i need to resolve and hence need to try vim and see how it will work out.
I suppose that this solution will not satisfying you completely but Rstudio IDE features a basic VIm editing mode: Global Option > Code Editing > Enable vim editing mode.
I think the windows binaries of Vim 7.3 need Python 2.7 or 3.1. You can check the information that you get via :version; the linked Python version is somewhere in it.
So my solution would be installing Python 2.7 (+pywin32 for python 2.7). Also, check if Python is working in Vim before trying to use the R plugin.