selenium

Webscraping: ElementNotInteractableException while trying to fill the form on this website

天大地大妈咪最大 提交于 2021-02-11 14:50:45
问题 I have been trying to scrape data from this site. I need to fill Get the precise price of your car form ie. the year, make, model etc.. I have written the following code till now: import requests import time from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait, Select from selenium.common.exceptions import NoSuchElementException from selenium.common

New Microsoft Edge and Selenium web driver

偶尔善良 提交于 2021-02-11 14:48:05
问题 I am a student and I started writing my first scripts using Ruby, Capybara, rspec and selenium web driver. I need to run my script in all modern browsers, but I'm facing some problems to run my script at the new Microsoft browser Edge. My rspec config is something like this: Capybara.configure do |config| config.default_driver = :selenium #This line is for run tests using Mozilla Firefox #config.default_driver = :selenium_chrome #This line is for run tests using Google Chrome end Edge is just

selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element : what should i do

一个人想着一个人 提交于 2021-02-11 14:46:25
问题 I am web crwaling but I keep getting troubles... selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element there is a error in click = '//*[@id="pagerTagAnchor' + str(j) + '"]' driver.find_element_by_xpath(click).click() what should i do? import requests from bs4 import BeautifulSoup from selenium import webdriver f = open('movie.txt', 'w', encoding='utf-8') options = webdriver.ChromeOptions() options.add_argument('headless') options.add_argument(

Chrome is being controlled by automated test software “not secure” data:, Python

ε祈祈猫儿з 提交于 2021-02-11 14:43:12
问题 I'm using the selenium library in python to open google chrome and visit google.com automatically, this is how my script looks like at the moment import os from selenium import webdriver from selenium.webdriver.chrome.options import Options chromedriver = "/usr/bin/chromedriver" os.environ["webdriver.chrome.driver"] = chromedriver chrome_options = webdriver.ChromeOptions() chrome_options.accept_untrusted_certs = True chrome_options.assume_untrusted_cert_issuer = True chrome_options.add

How to do scheduling task in django and selenium combine project?

不羁的心 提交于 2021-02-11 14:34:13
问题 I am working on a web app project in Django with selenium where per one user there is one chrome browser open also chrome profile directory per user and chrome stay alive 24/7. Where the user can send msg or schedule msg. My problem is how can I send a schedule msg ? The following problem I am facing while working on my project: How to open a browser that already associated with my user because I already have user chrome profile directory per user and chrome is always open. I want that user

Selenium Basic VBA focus on new tab that is opened by Click

偶尔善良 提交于 2021-02-11 14:34:06
问题 I'm working on the Selenium Basic Wrapper for Excel VBA, but upon clicking a button that opens a new tab, I am unable to get the selenium web-driver to switch focus onto the new tab that is opened, and to close the original tab.. Believe this should be achievable using the Java Selenium, but is there any way to do it through the Selenium Basic wrapper on excel VBA? Have tried using bot.switchtopreviouswindow/nextwindow to no avail, Selenium does not even seem to detect the new tab/window

Selenium Regex: Match literal string with dynamic date

元气小坏坏 提交于 2021-02-11 14:30:47
问题 I'm writing some Selenium tests and need to confirm the presence of a text string that has dynamic date and currency components. Example: "This is the date dd/dd/dd and this is the amount $ddd.dd." Is this possible with the Selenium regex implementation? Thanks, Richard 回答1: If I'm not mistaken selenium supports the full power of javascript Date dd/mm/yyyy 01/01/1900 through 31/12/2099 Matches invalid dates such as February 31st Accepts dashes, spaces, forward slashes and dots as date

Scraping a specific website with a search box and javascripts in Python

。_饼干妹妹 提交于 2021-02-11 14:30:22
问题 On the website https://sray.arabesque.com/dashboard there is a search box "input" in html. I want to enter a company name in the search box, choose the first suggestion for that name in the dropout menu (e.g., "Anglo American plc"), go to the url with the info about that company, load javascripts to get full html version of the obtained page, and then scrape it for GC Score, ESG Score, Temperature Score in the bottom. !apt install chromium-chromedriver !cp /usr/lib/chromium-browser

Selenium Regex: Match literal string with dynamic date

半世苍凉 提交于 2021-02-11 14:28:23
问题 I'm writing some Selenium tests and need to confirm the presence of a text string that has dynamic date and currency components. Example: "This is the date dd/dd/dd and this is the amount $ddd.dd." Is this possible with the Selenium regex implementation? Thanks, Richard 回答1: If I'm not mistaken selenium supports the full power of javascript Date dd/mm/yyyy 01/01/1900 through 31/12/2099 Matches invalid dates such as February 31st Accepts dashes, spaces, forward slashes and dots as date

How to extract the text 73 from the text 1-16 of 73 results from the search result summary within https://www.amazon.com using Selenium and Java

ε祈祈猫儿з 提交于 2021-02-11 14:24:35
问题 I am navigating to https://www.amazon.com/ there I am looking for 'samsung tv 55 inch' setting it in the search box text field then I am trying to extract the text of (63 results [see image attached]): I can't find the correct locator and how to find it, this is my code: package com.bottomline.automation.tests.ui; import com.bottomline.automation.pageobjects.model.AmazonWebPage; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; public class AmazonTest extends