Home>
has an element like this:
how to pull a link?
browser: fire fox
-
Answer # 1
Something like this:
links= [elem.get_attribute ('href') for elem in elems]
-
Answer # 2
If you want a specific object
Selecting an element
link= driver.find_element_by_xpath ("/html /body /div [1] /header /div [3] /nav /a [2] /@ href")
At the end, just add @href and it will return the link
Related questions
- python : How to upload a connected Tor proxy to Vps Selenium Firefox
- python : Loop problem ?????? How to solve? [closed]
- Is it possible to get the values of variables of a web page in Selenium (Python)
- python : Selenium How to throw a Firefox browser that has a proxy Torah into the hosting
- Turn data into a Python dictionary
- python : Writing multiple print variables to a file
- python : How do I write an assert on one of the objects in a json array?
- python : Pyqode editor stopped working with PySide
- Python Selenium Firefox popup
@Jack_oS I took this screenshot as an example I just wondered how to pull the link
main2021-02-23 11:09:46