Skip to content
Advertisement

Tag: selenium

xpath inside founded elements using selenium

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 easily find each block data using relative xpath

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 shorten your xpath expression as follows:

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 able to get that href with the following locator: You will also need

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 exception: If i don´t use the driver.switch_to_frame it throws this exception despite

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 almost seems that the

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 Output

Advertisement