E
E
Eva052016-09-23 15:45:47
Python
Eva05, 2016-09-23 15:45:47

What is the difference between Requests and Selenium?

Hello!
After reading about Selenium and using Requests a little, I still have a couple of questions:
1) What is the fundamental difference between Selenium and Requests?
2) What can Selenium do that Requests can't?
3) Why do I often see codes where Requests is used in conjunction with Selenium?
4)(Example) Is it possible to login, click, upload a file on a site (instagram, etc.) using only requests?
Many thanks in advance for your replies

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sim3x, 2016-09-23
@Eva05

docs.python-requests.org can't click, it can send and receive http requests
Selenium is a wrapper for the browser api through which you can click. It can do everything a browser can do

S
Sergey, 2016-09-23
@ktulu

Requests is a library for making requests. It is more "low-level" and may not be able to cope with JS sites. But much faster than Selenium,
Selenium - This is a whole combine, in fact controls the browser and can do almost everything that a browser can do, including working with JS. But in terms of speed, it is much inferior to Requests, because the whole browser actually works.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question