Selenium: Element is not clickable in Chrome Headless

Created on 12 Sep 2017  路  23Comments  路  Source: SeleniumHQ/selenium

I have a problem with clicking on the element from headless Chrome this call worked some time Without Headless Chrome and does not work at all with Headless

Call
driver.FindElement(By.Id("createBtn"))

Element
{Element (id = 0.18579689918655928-11)}
Coordinates: {OpenQA.Selenium.Remote.RemoteCoordinates}
Displayed: true
Enabled: true
Id: "0.18579689918655928-11"
Location: {X = 808 Y = 343}
LocationOnScreenOnceScrolledIntoView: {X = 808 Y = 343}
Selected: false
Size: {Width = 121 Height = 40}
TagName: "a"
Text: "Create"
WrappedDriver: {OpenQA.Selenium.Chrome.ChromeDriver}

Error:
Message: System.InvalidOperationException : unknown error: Element is not clickable at point (868, 363)
(Session info: headless chrome=61.0.3163.79)
(Driver info: chromedriver=2.31.488763

D-chrome R-awaiting answer

Most helpful comment

It worked for me after adding:

options.addArguments("--window-size=1920,1080");
options.addArguments("--start-maximized");
options.addArguments("--headless");

All 23 comments

+1 Have similar issue with chrome Version 61.0.3163.79 (Official Build) (64-bit) and Selenium version: '3.5.3'

org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (1268, 1175)
  (Session info: chrome=61.0.3163.79)
  (Driver info: chromedriver=2.30.477700 (0057494ad8732195794a7b32078424f92a5fce41),platform=Windows NT 10.0.15063 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds

With the previous Chrome version is OK

Same issue here, but in UI mode, tried Selenium 3.4.0 and 3.5.3, Chrome Version 61.0.3163.79 (Official Build) (64-bit)

Please retest with chromedriver 2.32

Alexey, yes, it fix the issue. Thank you

I'm still having this issue in 2.34

Also with 2.35

Also with 2.35!

I also have this issue with chromedriver 2.35.

Also with 2.35

Also with 2.35.528157

Same issue with chrome 64.0.3282.186 and chrome driver 2.36

Also with 2.36.540469

I had the same issue and noticed that if you use the param "app" when creating the driver instance the page won't load.

Hi!

I just faced the problem and I found a workaround.

running javascript

document.forms["formId"]["radioId"].checked=true;

this solved my problem, also with headless.

greetings!

2.42 as well. I don't know if this is the reason for the issue but it's happening on a page with an iframe. Everything inside the iframe works fine, but not on the parent outside of it.

I suggest reopening this issue.

Seeing this issue right now.

"element not interactablen (Session info: headless chrome=69.0.3497.100)n (Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 4.4.0-1027-aws x86_64)n/app/vendor/bundle/ruby/2.4.0/gems/selenium-webdriver-

It worked for me after adding:

options.addArguments("--window-size=1920,1080");
options.addArguments("--start-maximized");
options.addArguments("--headless");

Hi @ltiritilli,

It just worked like a charm with that arguments. (Selenium ChromeDriver 2.43.0)

Thanks a lot for your solution

It worked for me after adding:

options.addArguments("--window-size=1920,1080");
options.addArguments("--start-maximized");
options.addArguments("--headless");

worked for me!thx a lot

It worked for me after adding:

options.addArguments("--window-size=1920,1080");
options.addArguments("--start-maximized");
options.addArguments("--headless");

Worked for me very well! But why?!?!?!!

Seeing this in Selenium ChromeDriver 2.45.615355 and Chrome 71.0.3578.98. Using in RSpec for Ruby on Rails. I can confirm that this is with a Stripe iframe on the page.

I tried adding the additional options like so, but still got the error:
Capybara.register_driver(:headless_chrome) do |app|
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
chromeOptions: { args: %w[headless disable-gpu window-size=1920,1080 start-maximized] }
)

Capybara::Selenium::Driver.new(
app,
browser: :chrome,
desired_capabilities: capabilities
)
end

please submit ChromeDriver issues to the Chromium project: https://bugs.chromium.org/p/chromedriver

Was this page helpful?
0 / 5 - 0 ratings