I’m trying to extract the text value following a b tag that contains specific text. I’m using Selenium web driver with Python3. The HTML inspected for the value I’m trying to return (11,847) is here: This has an Xpath below (I’m not using this xpath directly to find the element as the table construction changes for different examples that I
Tag: xpath
Find elements by class name with Selenium in Python
I want to click on elements whose class is “innerImageWrapper editlink”. I use this code but it’s not working. it’s working. but I dont want use xpath. I want use class name Answer By.CLASS_NAME receives single value while here you trying to pass 2 values: innerImageWrapper and editlink. To locate element by 2 class names you can use CSS Selector
Selenium – How to find an element by part of the placeholder value?
Is there any way to find an element by a part of the placeholder value? And ideally, case insensitive. <input id=”id-9″ placeholder=”some TEXT”> Search by the following function doesn’t work browser.find_element(by=By.XPATH, value=”//input[@placeholder=’some te’]”) Answer You can always use contains instead of equals, as following: To make it case-insensitive you can use translate function, as following: Case-insensitive contains Xpath is taken
How to solve “selenium.common.exceptions.NoSuchElementExceptio” in selenium when creating a twitter bot?
I am trying to creating a twitter bot and I am stuck on the log in page. Here is my code: I am always getting the the below mentioned error: I have tried it with css_selector, xpath, class, ID but nothing seems to work. I am not able to click the box to enter my email ID and password. Can
Selenium – how to check that button is HIDDEN, without throwing error? (python)
I’m trying to do the test to learn Allure, and to assure that the test is passed, the button has to be INVISIBLE. It first clicks 1st button to make 2nd button appear. Then click 2nd button – so same (2nd button disappears). Here it is: http://the-internet.herokuapp.com/add_remove_elements/ My code would look like this (below), it clicks the 1st button, 2nd
Scraping data through changing Xpaths
I can’t figure out how to scrape data, I am trying to scrape the product name, price and other information from the website, the product names are easy to access as they have similar xpath with only one tag that changes but for the prices the there are multiple changes to the tags.Is there an alternative to how I can
Selenium taking a lot of time to find element by XPATH
I am trying to scraping name and email of agents from this site. The code firstly captures link to every profile on first page and then visits each profile to get name and email. But the problem is that it is taking alot of time to get anchor tag having name of agent in it. Here’s the code: Is there
selenium xpath unable to identify class visually seen in HTML
I am trying to click on the rate button to set the rating for episode one of Atlanta season four on the IMDB website as illustrated by the image further below. I have tried various combinations of selenium xpath values and have googled various links to attempt to achieve this, but can’t remember which now. My current python is below.
Performing web scraping using selenium on influenster.com. I am getting just one scraped review even though it was in loop and the xpath was correct
OUTPUT IS JUST ONE NAME AND NOT ALL I need to scrape all the reviews from https://www.influenster.com/reviews/loreal-paris-elvive-extraordinary-oil-deep-nourishing-shampoo-and-conditioner-set-126-fl-oz. Even I am running a loop I am getting only one username. Please help me out Answer You getting only 1 review because XPath locator you are using //*[@id=”app-base”]/div[1]/div[4]/div[1]/div[1]/div[3] returns only 1 element, so your for loop is performed only once. You can
ElementNotInteractableException when sending keys (email field) Python Selenium
I am trying to login to this website using Selenium: https://openwho.org/sessions/new . However, none of my attempts of sending keys to the email and password fields work. I have tried to find the field using various methods (i.e. XPATH, ID, CSS Selector, etc.) Answer There are 2 blocks of login elements on this page, the visible is the second one.