I found 10 elements using: Then i’m trying get information from collected divs by xpath in cycle: But always i get first element Question: Is it possible to get information from each block in cycle using relative xpath with already founded element by selenium? One of divs HTML: Answer Yes, you can easil…
Tag: selenium
How to avoid error if element is not clickable at point (selenium python)?
I have this script that I wrote with selenium python, but sometimes I got this problem at this one place, when it shows that is not clickable. Element is there and it can be found but it can not be clickable, because sometimes I need to meet required conditions. See error bellow. But when this happens I got e…
How to press button?
I’m pretty new with the selenium module in python and I’m not able to press a button. Here the HTML-Code: Here’s a minimal example: what am I doing wrong? Context I want to automatically select the language of the website. Answer It seems to be your locator strategy is correct. You can short…
Problem with selenium python (chromedriver) [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 6 months ago. Improve this question I ha…
How can I make Selenium get a href with PYTHON?
I tried all the methods I found here https://selenium-python.readthedocs.io/locating-elements.html but I couldn’t get that link from the page. I need to get the link from the href HTML page code: Some of the unsuccessful attempts: +Some of the unsuccessful attempts: The full code: Answer You should be a…
How to interact with interactive elements inside iframe using Selenium
How can I interact with the ddlDelegacion (dropdown menu) element in this webpage using selenium webdriver for python? I´m doing this to periodically download some (periodically updated) documents from a government webpage for my family The HTML code is this My approach is this: However it raises this excepti…
How to get a full-page screenshot in Python using Selenium and Screenshot
I’m trying to get a full-length screenshot and haven’t been able to make it work. Here’s the code I’m using: But this gives us a clipped screenshot: So as you can see that’s just what the driver window is showing, not a full-length screenshot. How can I tweak this code to get wha…
Automatically upload images on vinted
I’ve been stuck on a task for a few days. I can’t load images automatically on the vinted image browser. I tried running the following code: The problem is that the paths of the recovered images end up on the terminal where the script is run, while they should be set in the upload window. It almos…
Python Selenium – href specific output
I have been working on a project to pull specific href links from a site. Everything is working but I also want to be able to pull only specific data from href link. I haven’t been able to figure that part out. Here is the output I’m trying to get the output to look like this Answer Use regex Outp…
Selecting Element from dropdown with style=”display: none” doesn’t work in Selenium
In the dropdown I’d like to select ‘Text3’, but it doesn’t work. What I tried: and as well: I’m stuck and don’t know how to solve this. Need some help, thanks! Answer With Selenium, AFAIK, you cannot select elements with display:none, if you want to force it, you’ll n…