I am trying to automate a task with selenium, using Firefox.
I wrote all the code, and it worked perfectly with headless=False, but when I changed it to headless=True, it suddenly did not press some of the buttons - the ones that transfers to a different page works, but the other ones (They should be pressed to register to a service) did not (I know they did not work because when I checked if I was registered after running it, I was not - which was not the case with headless=False).
I printed what is written on the buttons which did not work, so I know the program recognises them, and because I was able to get there I know the other buttons got clicked and responded well.
All buttons was specified the same way (I tried both XPath and CSS Selector).
Any ideas for why it happens and how to fix it will be appreciated.
Thanks!
Note: This site requires username and password, so I don't think it would be useful to add a link.