How to determine whether a button on a page is bottomed or topped

1. I used Python to write a script to check whether a batch of web pages contain dialable phone components or consulting components. Now the question is how to tell if this component is fixed at the bottom or top (without sliding with the page). I know that position: fixed or JS can be fixed, but I use requests request, there is no CSS file, so can not be parsed to a separate CSS file position, with selenium, do not know id does not know name, find CSS element attribute is OK?

Mar.12,2021

must get css, or there is no way, this is very troublesome, because even if you get css, you cannot match the element with css, because your parser is not webview,. It is better to use selenium, but it is also troublesome. You can try to get the inline style,class style, of the element to match whether it is fixed.

Menu