webdriverwait

How to extract data from the following html?

天涯浪子 提交于 2021-01-31 07:23:30
问题 The Html from where i want to extract data is: <div class="infoMessageInner"> <p> <span ng-bind-html="servicesCtrl.texts.addressInfo" class="ng-binding"> Fiber är beställd till adressen. Tjänsterna kan du beställa när installationen är färdig. </span> <span ng-show="servicesCtrl.address.status === 'Orderable'" class="ng-hide"> <a ng-click="servicesCtrl.preScrollToVerticalPosition('checkout', 'checkout', '/checkoutFiber', undefined, 'Checkout fiber')">Till fiberbeställningen </a> </span> <span

How to extract data from the following html?

Deadly 提交于 2021-01-31 07:22:16
问题 The Html from where i want to extract data is: <div class="infoMessageInner"> <p> <span ng-bind-html="servicesCtrl.texts.addressInfo" class="ng-binding"> Fiber är beställd till adressen. Tjänsterna kan du beställa när installationen är färdig. </span> <span ng-show="servicesCtrl.address.status === 'Orderable'" class="ng-hide"> <a ng-click="servicesCtrl.preScrollToVerticalPosition('checkout', 'checkout', '/checkoutFiber', undefined, 'Checkout fiber')">Till fiberbeställningen </a> </span> <span

How to retrieve the text of a WebElement using Selenium - Python

左心房为你撑大大i 提交于 2021-01-29 22:11:33
问题 I am new to Python and Web Scraping so please bear with me. I have been trying to build a web scraping tool to open a web page, log-in, and retrieve a certain value. Thus far, I have been able to open the web page and log-in. However, I simply cannot find a way to retrieve (print) the value that I require. This is what my current code looks like: from selenium import webdriver from bs4 import BeautifulSoup driver = webdriver.Chrome(executable_path=r'C:/Users/User/Downloads/chromedriver.exe')

How to retrieve the text of a WebElement using Selenium - Python

会有一股神秘感。 提交于 2021-01-29 21:25:36
问题 I am new to Python and Web Scraping so please bear with me. I have been trying to build a web scraping tool to open a web page, log-in, and retrieve a certain value. Thus far, I have been able to open the web page and log-in. However, I simply cannot find a way to retrieve (print) the value that I require. This is what my current code looks like: from selenium import webdriver from bs4 import BeautifulSoup driver = webdriver.Chrome(executable_path=r'C:/Users/User/Downloads/chromedriver.exe')

How to extract all <li> elements under <ul>

大兔子大兔子 提交于 2021-01-29 12:29:15
问题 I want to extract all <li> element text that are under <ul> for which I tried elem = driver.find_elements_by_xpath(("//div[@class='left width50']/p/b/ul")) len(elem) gives '0' or empty list. here is the html source <div class="left width50"> <p><b>Features:</b></p> <ul> <li>Easy spray application</li> <li>Excellent bonding properties</li> <li>Single package</li> <li>Mixed with clean potable water at job site</li> </ul> </div> HERE is the link of the website How to go about it any suggestions?

How to Mouse Hover over different images with dynamic xpaths through Selenium Java

隐身守侯 提交于 2021-01-29 09:51:07
问题 There are seven images. I want to do mouse hover on every image and and check AddToCart button is displayed or not. I have tried following code and it is not working. Reference: http://automationpractice.com/index.php public boolean checkMouseHoveronAllItems(WebDriver driver) { String xpathOfItems="//[@id='homefeatured']/li['+index+']/div/div[1]/div/a[1]/img"; String xpathOfAddToCartButtons="//div[@class='button-container']/a[@title='Add to cart']"; boolean res=false; for(int index=1;index<

Close browser popup in Selenium Python

佐手、 提交于 2021-01-29 08:51:17
问题 I am scraping a page using Selenium, Python. On opening the page one Popup appears. I want to close this popup anyway. I tried as below: url = https://shopping.rochebros.com/shop/categories/37 browser = webdriver.Chrome(executable_path=chromedriver, options=options) browser.get(url) browser.find_element_by_xpath("//button[@class='click' and @id='shopping-selector-parent-process-modal-close-click']").click() I tried a couple of similar posts here but nothing is working with me. below the error

How do I extract data from dynamic updating webpages

徘徊边缘 提交于 2021-01-29 05:50:33
问题 I want to scrape the review from Sephora website. The review is dynamically updated. After inspection I found the review is here in the HTML code. <div class="css-eq4i08 " data-comp="Ellipsis Box">Honestly I never write reviews but this is a must if you have frizzy after even after straightening it! It smells fantastic and it works wonders definitely will be restocking once I’m done this one !!</div> I want to write a python selenium code to read the review. The code I wrote is here... from

“TypeError: 'str' object is not callable” using WebDriverWait for link_text in Selenium through Python

夙愿已清 提交于 2021-01-28 19:04:32
问题 This is my first post on Stack Overflow. I have been browsing and searching for every possible answer to this question on SO, and I figured at this point I should just ask a question, as I have been at this wall for days now. I am currently working on a web scraping project with Selenium in Python. I have already scraped one website and am currently on the second, and I have run into a seemingly intractable issue. The following code works perfectly fine with no errors on the page https://www

How to click on the radio button through the element ID attribute using Selenium and C#

倾然丶 夕夏残阳落幕 提交于 2021-01-28 09:50:14
问题 I am trying to select a radio button and input element, it has an id of group and value of In_Group . There are 4 different radio buttons with the same id but different values hence I am trying to select the correct one i am looking for. <input class="custom-radio" id="group" name="group" type="radio" value="In_Group"> I tried something like this: driver.FindElement(By.XPath("//*[contains(@id='group' and @value='In_Group')]")) But the element is not found could someone help me out 回答1: To