selenium use experience summary

Slenium has stepped on a lot of pits to summarize



1. Version problems The versions

between the browser, selenium, and chromedriver must be the same. Otherwise, the version must be unified. Sometimes it can run without unity, but there will be some inexplicable. Wonderful bugs, such as the browser is open too much, there may be flashbacks, etc.,

and try to use a higher version. The higher version has less bugs



2. ie, firefix, chrome are the three browsers to choose
from in terms of speed, chrome is the fastest, ie is the slowest


3. Selectors
use js to operate page elements as much as possible. When using selenium api to operate, sometimes it will There are some problems that report

elements
are invisible Set a callback method to wait for the element to load within a certain period of time. 5. There is a requirement for multiple tab operations in a browser, and multiple tab windows need to be operated concurrently. Unfortunately, when switching tab windows concurrently, it is found that the time of switching windows is very slow, and the program is operated in parallel, but the effect is serial operation. Maybe the underlying api limits parallel operations












Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326988344&siteId=291194637