Anietie Godswill
Anietie Godswill

Reputation: 53

How to fill web forms in python without using selenium

Is there any module or way in python for filling web form without using selenium

Upvotes: 0

Views: 1262

Answers (1)

Justin Lambert
Justin Lambert

Reputation: 978

For multiple reasons, logging into sites like Gmail and Facebook using WebDriver is not recommended. Aside from being against the usage terms for these sites (where you risk having the account shut down), it is slow and unreliable.

The ideal practice is to use the APIs that email providers offer, or in the case of Facebook the developer tools service which exposes an API for creating test accounts, friends and so forth. Although using an API might seem like a bit of extra hard work, you will be paid back in speed, reliability, and stability. The API is also unlikely to change, whereas webpages and HTML locators change often and require you to update your test framework.

Logging in to third party sites using WebDriver at any point of your test increases the risk of your test failing because it makes your test longer. A general rule of thumb is that longer tests are more fragile and unreliable.

Upvotes: 1

Related Questions