U
U
Us592019-06-06 23:21:51
Parsing
Us59, 2019-06-06 23:21:51

What needs to be installed to run Selenium on ubuntu?

What exactly needs to be installed on the server to start working with Selenium?
I want to use Selenium in conjunction with php, for this I chose this library
. I want to understand what exactly I need and why I need to install it on the server, so as not to install something I don’t know what.
I watched videos on YouTube, many put Composer, Codeception , a bunch of other stuff .. please tell me what exactly I need to put?) javascript, does it need to be installed on ubuntu?)
This is how I imagine using Selenium:

public function Request ()
    {
// 1 -тут я делаю какие-то задачи...
// 2 - а тут я должен делать запрос к сайту, на котором я должен авторизоваться и вытащить некоторые данные... Я так понимаю прямо из php кода я смогу вызвать ф-цию которая выполняет уже заготовленные действия и возвращает результат сюда.
// 3 - вот тут я уже хочу обрабатывать результат, который получили в 2 пункте.
    }

If someone writes a list of what needs to be put on ubuntu, I will be very grateful.
1. Библиотека php-webdriver
2.
3.
4.
...

To clarify, I will say that I want to use the Google Chrome browser.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SlavikF, 2019-06-07
@SlavikF

Php-webdriver is for driving Selenium server.
That is, in addition to PHP-webdriver, you also need to install Selenium server. And put the browser(s) that Selenium will manage.
Someone has to run Selenium Server - and usually it's not your PHP script.
Selenium Server requires Java.
Selenium Server can be installed on the same host, or on a different one - Selenium works over the network.
At the same time, if you have Ubuntu Server without Desktop, then Selenium Server will not be able to run browsers there (because there is no UI).
Alternatively, it is possible without Selenium Server - for example, manage Chrome Headless. Then it is possible without UI, that is, purely on Ubuntu Server, without Desktop.
In my experience, Chrome Headless is slightly more reliable than Selenium Server.
Nothing is needed because the javascript is executed in the browser.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question