0

I have a Python program that needs selenium to open a browser and perform some actions without using the "--headless" option.

I want to create a restAPI out of this work and run this program on the server where we don't have any GUI and because of this, my code doesn't work.

Is there any solution to open the browser on the server or on the user side (I mean is there any js code that could be integrated with python code)?

using JS to open the browsers on the client side and receive the data and perform the actions in Python.

hoomanvhd
  • 53
  • 1
  • 6
  • Seems like you need this: [A virtual display for ubuntu server](https://stackoverflow.com/questions/36582594/a-virtual-display-for-ubuntu-server) – Samathingamajig Jun 22 '21 at 17:22
  • please check this [one](https://www.guru99.com/selenium-with-htmlunit-driver-phantomjs.html) may be helpful – gowridev Jun 22 '21 at 17:28
  • @Samathingamajig the problem is that we're not allowed to change the server features. – hoomanvhd Jun 23 '21 at 15:33
  • @gowridev I checked that page, but unfortunately for my work, if I don't open the browser the website would not give me any data, and headless browsers are not working in this case. – hoomanvhd Jun 23 '21 at 15:34
  • @hoomanvhd may be this [one](https://stackoverflow.com/questions/40715319/is-there-a-way-to-run-selenium-tests-on-a-remote-host) – gowridev Jun 23 '21 at 15:54

0 Answers0