Search code examples
pythonfirefoxseleniummozilla

Selenium include mozilla instance


I have a server on which I want to build a script to login to page which is using javascript. I want to use python selenium to achieve the same.

We have a shared drive which contains all the installed binaries and the same has to be included. So when running a python program I won't be using my #!/usr/bin/python instead efs/path../python, similarly all the packages are to be included in this ways. sys.path.append("/efs/path.../selenium-egg-info"). This works good, but as selenium would need firefox included, I could see mozilla in the path, but where are it's binary, exactly which folder to include inside mozilla.


Solution

  • You can think Selenium as launching 'firefox' behind the scenes. You won't see it but it's there and then accordingly opening up the webpage and manipulating things.

    How do you think it does all that cool stuff without writing explicit url header etc. So for that you need to have a firefox installed with a physical display(monitor) installed.

    You can fake a pyhsical terminal it's just input/output but you AFAIK you need to have a firefox installed. Sad news but that's the way it is.