<a href="/r/androidapps/comments/13olal1/what_happens_to_photos_resized_in_samsung_builtin/">
<div class="_1AKeAGcglmBjK1SUUXNFti _1-SZ3VwLjbFwTzaZvU8FBX _1FT0e6kh1BBb_oALAMW_l7 _1yBpz1MEPxxYTxjlEilGtB" data-testid="post-title" style="--posttitletextcolor:#222222">
<h3 class="_eYtD2XCVieq6emjKBH3m">what happens to photos resized in Samsung built-in gallery app</h3> </div>
</a>
I want "/r/androidapps/comments/13olal1/what_happens_to_photos_resized_in_samsung_builtin/" in the "a" tag. How do I use selenium to get the url as a string?
driver.find_element(By.LINK_TEXT, WHAT GOES HERE?)
2
Answers
You should be able to find that information using:
Selenium documentation can be found here.
The code using
LINK_TEXT
should be:If you want to print the
href
attribute and check, try the below code:It should print the below in the console: