Chromium Edge 91 on a Windows 10 crashes - python

I am trying to run a simple script to open up a google page on Chromium Edge using Python.
What I have so far is
Import selenium
From selenium import webdriver
Path= “..../msedgedriver.exe”
Driver= webdriver.Edge(executable_path=path)
Driver.get(https://google.com)
Got below error:SessionNotCreatedEcception:session not created from tab crashed(Session info:MicrosoftEdge=91.0.864.41)
Tried several things and searched online but no luck yet.Any help will be much appreciated!

There are some problems in the code you provide, I fixed them and tested it, and it works well. My Edge Version is 91.0.864.41 (Official build) (64-bit).
Below is my sample code and you can also try:
import selenium
from selenium import webdriver
path= "D:\\webdriver\\msedgedriver.exe"
driver= webdriver.Edge(executable_path=path)
driver.get("https://www.google.com/")
Please note to modify the path to you owns and use the absolute path of the WebDriver.
I think it may just be a code problem that causes the error.
If the problem persists, can you please provide more information? Such as what version of selenium are you using and what operating system are you using?

Related

When using selenium for python - cannot find Chrome binary for chromedriver [duplicate]

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 last year.
When trying to use selenium I keep receiving the error 'UnknownError: cannot find Chrome binary'
from selenium import webdriver
browser = webdriver.Chrome(r"C:\Users\neal_\OneDrive\Documents\chromedriver_win32\chromedriver.exe")
browser.get("https://dblp.org/")
I've downloaded the chromedriver at this location and used cmd to see if it actually runs and it gives the response 'chromedriver was started successfully'
I'm not sure where I'm going wrong here. Any suggestions greatly appreciated, most of the common/popular threads I've already followed and not found any avail.
Or if anyone has a guide to setting up selenium for windows thats straightforward, it would be also appreciated.
Install selenium webdriver On windows 10
https://mundrisoft.com/tech-bytes/install-selenium-webdriver-windows/
I coded this on my laptop and it's work (you can try on yours and say me if it's work ?)
from selenium import webdriver
driver = webdriver.Chrome(executable_path="C:\...")

EDGE VERSION WON'T WORK with seleniumWebdriver all of a sudden

Using selenium webdriver with Edge browser. Worked fine until last night/morning. Errors are:
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of MSEdgeDriver only supports MSEdge version 96
Current browser version is 98.whatever. It says the application was modified on 2/3 of this year, which I didn't consent to as far as I can remember.
Why did that catch? Did it automatically install an update without letting me know? Why would that be?
In any case, TLDR, how do I fix this?! and which does Selenium dislike: my edgeDriver, or Selenium being out of date? should I REVERT EdgeDriver by finding an older version (how?), or would it be best to update Selenium somehow?

Anaconda Selenium issues with webdriver

I have been struggling to figure out why I keep getting errors trying to use selenium. I'm using a local install of anaconda3 on my /home/user unix drive at the company I work for. I already pip installed selenium, seemingly without issue, but when I try the following:
from selenium import webdriver
driver = webdriver.Firefox()
it fails with the following message:
WebDriverException: Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line
I've tried downloading the most current chromedriver and trying with that, I've tried installing another gecko-driver, I've tried all kinds of things. But nothing is working. I'm happy to provide any amount of additional information, I just want to get this off the ground at some point...
Thank you!
from selenium import webdriver
path = r'C:\yourgeckodriverpath\geckodriver.exe'
driver = webdriver.Firefox(executable_path=path)
Alright, through a combination of the responses to this question, I have figured out what (I think) went wrong. I was using a linux anaconda install on my company's servers, which (I believe) meant my python had no access to a browser driver. The solution was sadly to install anaconda locally, manually download/unzip/install selenium and geckodriver, and then make sure I pass the whole "executable_path=path" parameter to the Firefox method. This didn't work for Chrome for some reason, which I'll assume has something to do with the unchangeable security specifications on my work machine. If any part of this doesn't sound right, feel free to chime in and shed more light on the issue. Thanks!

python selenium chrome webdriver giving me data; page

I've been working with the following code, trying to introduce myself to selenium. When it runs, the chrome browser opens, but the page is blank, with no source code a far as I can tell, and 'data;' in the address bar. Any information on why this is happening would be greatly appreciated.
from selenium import webdriver
browser = webdriver.Chrome(service_args = ['--ignore-ssl-errors=true', '--ssl-protocol=TLSv1'])
url = 'https://www.google.com/'
browser.get(url)
I have also tried it without the service_args and tried it specifying the driver path and both, but get the same result each time
The most possibility is your browser not compatible with the webdriver. Please confirm your browser version and webdriver version.
My chrome version is 60 and chromerdriver is chromedriver_2.30.exe
You can find compatible version from here
Update the chromedriver and Chrome Browser, sometime I also faced this issue.
I don't see any error as such in your code. Though the documentation for service_args is missing in the Selenium-Python API Docs as well as in the ChromeDriver Getting started Doc. But 0096850 clearly suggests service_args is implemented.
The service_args works well at my end. Hence I suspect there is a mismatch between Selenium version, chromedriver version and Chrome version we are using. First and foremost, we have to ensure that our Selenium version, chromedriver version and Chrome version are compatible. You can find the compatibility information on the Downloads page of ChromeDriver individually for each releases.
The Downloads page clearly mentions:
Latest Release: ChromeDriver 2.32 Supports Chrome v59-61
Additionally, you may be required to pass the argument executable_path to mention the absolute path of the chromedriver binary as follows:
Windows 8 based code:
from selenium import webdriver
browser = webdriver.Chrome(executable_path=r'C:\Utility\BrowserDrivers\chromedriver.exe', service_args = ['--ignore-ssl-errors=true', '--ssl-protocol=TLSv1'])
url = 'https://www.google.com/'
browser.get(url)
I've met the same problem,but I solved it by updating my webdriver
Update your webdriver of chrome ,here is the link https://sites.google.com/a/chromium.org/chromedriver/downloads
If you're using Codeception, start the test with :
$I->amOnPage('/');
simply add this argument to selenium options (google how add options on solenium python to how to add options argument)
options.add_argument("--remote-debugging-port=9225")

How can i run casperjs script from python on ubuntu?

I would like to run casperjs from python on zorin os 11. I have researched about that topic but i can not figure it out exactly because there is lack of information as far as i can see. So, how can i do that?
Have you tried the obvious solution? I mean, did you try the following?
import os
os.system('<your ubuntu code>')
For several issues, this 'os' library solve the problem.
Selenium + PhantomJS is your solution (more info http://selenium-python.readthedocs.io/)
from selenium import webdriver
browser = webdriver.PhantomJS()
browser.get("www.yourURL.com")

Categories