Selenium WebDriver - Element is not clickable at point - c#

I have an automation project using Selenium WebDriver in version 3.6 and the Chrome Driver. The software was working fine until it started to display the error
Unhandled exception has occurred in your application. If you click
Continue, the application will ignore this error and attempt to
continue. If you click Quit, the application will close immediately.
unknown error: Element is not clickable at point (25, -9) (Session
info: chrome=61.0.3163.100) (Driver info: chromedriver=2.31.488763
(092de99f48a300323ecf8c2a4e2e7cab51de5ba8),platform=Windows NT
6.1.7601 SP1 x86_64).
I'm using the .click () method to click on the element, and this always worked, I've never had any problems with the software running for months
Searching the internet I found methods that even worked like using .SendKey () and IJavaScriptExecutor to give a scroll to the element. But the point is I never had to do this ..
Could it be some bug in this version of Selenium? Maybe Chrome Driver?

This is caused by having Chrome version 61+ and not using the latest ChromeDriver.
Download the latest ChromeDriver (2.3.2) which "Fixes a bug where Chromedriver fails to click due to page scrolling changes in Chrome 61+".

Related

selenium chromedriver is throwing a version error but version is matched [duplicate]

when i go to command prompt and type chromedriver -v:
ChromeDriver 79.0.3945.36 (3582db32b33893869b8c1339e8f4d9ed1816f143-refs/branch-heads/3945#{#614})
but when i try to run this code :
from selenium import webdriver
class InstaBot:
def __init__(self):
self.driver=webdriver.Chrome()
self.driver.get("www.instagram.com")
InstaBot()
it gives me error like this:
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 80
why this is happening i tried to remove selenium as well as chromedriver
and reinstall of version 79.0.3945 but when i run it ,it show this can only be run on version 80
my chrome version is 79.0.3945 which is lastest ,and version 80 chrome is chrome beta
This error message...
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 80
...implies that the ChromeDriver v80.0 was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
You mentioned about using chromedriver=79.0.3945.36 and the release notes of chromedriver=79.0 clearly mentions the following :
Supports Chrome v79
Presumably you are using chrome v79.0 browser.
So, it's quite evident your have chromedriver=80.0 present within your system which is also within the system PATH variable and is invoked while you:
self.driver=webdriver.Chrome()
Solution
There are two solutions:
Either you upgrade chrome to Chrome Version 80.0 level. (as per ChromeDriver v80.0 release notes)
Or you can override the default chromedriver v80.0 binary location with chromedriver v79.0 binary location as follows:
from selenium import webdriver
driver = webdriver.Chrome(executable_path=r'C:\path\to\chromedriver.exe')
driver.get('http://google.com/')
You can find a detailed discussion in Ubuntu: selenium.common.exceptions: session not created: This version of ChromeDriver only supports Chrome version 79
Additional Considerations
Ensure to:
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
If your base Web Client version is too old, then uninstall it and install a recent GA and released version of Web Client.
Take a System Reboot.
Execute your #Test as non-root user.
Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.
Reference
You can find a relevant detailed discussion in:
How to work with a specific version of ChromeDriver while Chrome Browser gets updated automatically through Python selenium
Use Bonigarcia plugin in project. After that it will manage all driver by itself.It reads chrome version and instantiate driver accordingly.
for help follow my post :
https://www.linkedin.com/pulse/webdrivermanager-bonigarcia-rohan-ravi-yadav/
or original git link/post
https://github.com/bonigarcia/webdrivermanager
If any help required , Let me know

Couldn't locate an element by these strategies: By.id; OpenQA.Selenium.WebdriverTimeoutExceltpion: Timed out after 1 seconds

I have written an automation framework in VS2017 using Selenium Webdriver in C# and PageObjects. That is working absolutely fine in windows. Same PageObjects code is used in VS2017 for MAC OS and it is not working there giving
OpenQA.Selenium.NoSuchElementException : Couldn't locate an element by these strategies: By.Id: userNameInput;
  ----> OpenQA.Selenium.WebDriverTimeoutException : Timed out after 1 seconds
I have moved my code from VS2017 For Windows to VS2017 for Mac. That is successfully converted and compiled. There were problems however i have resolved the webdriver related issues and now code is working perfectly to Launch Chrome & Safari. But whenever i try to find elements, the exception occurs. I have implemented Explicitwaits and other parameters but both Safari and Chrome are giving me errors at some stage in finding the elements. I have also tried finding the elements without POM but that doesn't work too.
Considering the following function i have written to Signout user from Dynamics CRM
public void UserSignOut(ref ExtentTest test)
{
WDEx.SwitchWindows(0);
Browser.Driver.SwitchTo().DefaultContent();
UserIcon.Click();
SignOut.Click();
}
where
UserIcon is
[FindsBy(How = How.Id, Using = #"navTabButtonChangeProfileImageLink")]
public IWebElement UserIcon { get; set; }
and SignOut is
[FindsBy(How = How.Id, Using = "navTabButtonUserInfoSignOutId")]
private IWebElement SignOut { get; set; }
It should work exactly the way as it is working on Windows Chromedriver with VS2017. If anybody could provide a solution then that could be very time saving for me. Thankful in Advance. Cheers!

chrome driver : disconnected: unable to connect to renderer

I am working with c# selenium.
I am getting error with chrome driver as :
System.InvalidOperationException : disconnected: unable to connect to renderer
(Session info: chrome=62.0.3202.94)
(Driver info: chromedriver=2.32.498550
(9dec58e66c31bcc53a9ce3c7226f0c1c5810906a),platform=Windows NT 10.0.15063 x86_64) (102)
Now I tried updating the chrome browser version to 2.33 and its working fine on my local machine.
But I am getting this error my server where I am executing this tests on schedule basis.
I am using TFS to deploy tests on the server and to run the tests.
the same project is working on my local machine but I am getting this error on server for the
driver.Manage().Window.Maximize();
line for all the tests.
I check out same project from TFS on my colleagues machine and tried executing there its was working fine.
I tried updating driver to 2.33 even tried downgrading the driver to 2.32 and executed multiple time but its not working.
I am using MS build to build the automation project and deploy it on server as well.
Since it works well on your local machine,but got error when you run the tests on the server.
First make sure your server environment are the same with your local machine such as chrome browser version is 2.33 and the driver is also 2.33.
According to this code driver.Manage().Window.Maximize(); line.
Please make sure that you give enough time for the window to load before you declare this statement.
If you are finding any element to input some data then provide reasonable delay between this and the input statement.
Starting ChromeDriver 2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a) on port 2499
Only local connections are allowed.
Exception in thread "main" org.openqa.selenium.WebDriverException: disconnected: unable to connect to renderer
(Session info: chrome=62.0.3202.75)
(Driver info: chromedriver=2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a),platform=Windows NT 10.0.15063 x86_64) (WARNING: The server did not provide any stacktrace information)
I have faced the same problem today, It get resolved by using updated chrome driver pack 2.33.
When I am using Python 3, facing the same error, in my situation, I did not close the chrome process after using it. So you should check the chrome process properly closed after using it.

Selenium Webdriver 2.47.0 throws invocation exception with FF28

I am using VS2015 EE (Version 14.0.25431.01 with Update 3) on Win 7
and Firefox v.28 browser not invoking from Selenium Webdriver version 2.47
enter image description here
On this line, I' ve the following exception:
The process can not access the file:
'D:\Users(userprofile)\AppData\Local\Temp\anonymous.511c4407b3df427791b4f7e1771eb39a.webdriver-profile.staging\webdriver.xpi\platform\WINNT_x86-msvc\components\webdriver-firefox-esr-previous.dll'
Please help me to avoid this error.
So please check the network settings firewalls, proxies. Update of antivirus software or security platform created for cyber-battlefield.
I've resolved killing such a process.

Alert Handling - Selenium WebDriver/ Selenium RC 2.18.0 - Exception

My automation test software for a web application runs on IE, Firefox, Chrome and Safari, and is written using C# and Selenium WebDriver (IE, Firefox, Chrome), Selenium RC (Safari).
A new error occurred when I upgraded to version 2.18.0 today. I am seeing the following exception:
System.InvalidOperationException: Modal dialog present (UnexpectedAlertOpen)
I saw this exception beingn thrown for IE, Firefox and Safari so far.
I looked up the release documentation and did not find anything that suggests that I should do differently to accept or cancel on alerts.
Is this a bug, or is there a new procedure to follow pertaining to alerts?
I had the same problem on my ccnet build server with Firefox since last update and I found that I need a update of my java version because of a security issue.
After the update all my test succeed and I had no more this error "System.InvalidOperationException: Modal dialog present (UnexpectedAlertOpen)".

Categories