selenium-webdriver

how to wait for one drop down list to be processed before moving to the next one?

我们两清 提交于 2020-01-23 02:44:06
问题 Having an issue with drop down menus in my selenium (python). In this page, what happens is that when selecting a drop down option, it will process the selection, making the other options not selectable until that process is finished. I'm trying to say in my script to wait until a drop down list has processed it's option before moving onto the next one, but it's just hanging. How can I get it to wait for the option to be processed in one drop down menu before moving to the next drop down?

Firefox 44.0.1 opening two tabs , when running selenium webdriver code

核能气质少年 提交于 2020-01-22 16:30:31
问题 My Firefox recently got updated recently. My firefox version is 44.0.1. When I run a simple code as below in selenium webdriver, two tabs are opening in firefox. How can i get rid of the unwanted tab. I changed Firefox setting, but still two tabs are opening. one tab is a plain tab and the second tab is https://support.skype.com/en/faq/FA34612/what-is-the-skype-extension. How can I load my URL that I want to automate in a single firefox window. Do I need to change any firefox setting. import

Firefox 44.0.1 opening two tabs , when running selenium webdriver code

拈花ヽ惹草 提交于 2020-01-22 16:29:33
问题 My Firefox recently got updated recently. My firefox version is 44.0.1. When I run a simple code as below in selenium webdriver, two tabs are opening in firefox. How can i get rid of the unwanted tab. I changed Firefox setting, but still two tabs are opening. one tab is a plain tab and the second tab is https://support.skype.com/en/faq/FA34612/what-is-the-skype-extension. How can I load my URL that I want to automate in a single firefox window. Do I need to change any firefox setting. import

Website blocking Selenium : is there a way to bypass?

此生再无相见时 提交于 2020-01-22 03:50:06
问题 This webpage opens fine manually, but directly goes to a "maintenance" error message when using Selenium ! from selenium import webdriver driver = webdriver.Chrome(executable_path="chromedriver") driver.get("https://www.winamax.fr/paris-sportifs/") Is there a way to avoid this behaviour ? 回答1: A bit unclear why you felt website blocking Selenium . However I was able to access the website following the solution below: Code Block: from selenium import webdriver from selenium.webdriver.support

Error 'Unable to locate element' when trying to locate 'Add to Cart' button on Flipkart

非 Y 不嫁゛ 提交于 2020-01-22 03:08:11
问题 I am trying to locate Add to Cart button on Flipkart but it does not work I have tried below xpaths but none works By AddToCart= By.xpath("//button[@class='_2AkmmA _2Npkh4 _2MWPVK'][text()='ADD TO CART']"); OR By AddToCart= By.xpath("//button[text()='ADD TO CART']"); //error org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//button[@class='_2AkmmA _2Npkh4 _2MWPVK'][text()='ADD TO CART']"} 回答1: Try this one. By CSS Selector --

How to expand the reviews and scrape the text clicking for the next page using Selenium and Python

落花浮王杯 提交于 2020-01-22 02:32:07
问题 I wish to scrape reviews from this url: https://seedly.sg/reviews/p2p-lending/funding-societies by using selenium. For my '''Automation of getting to the next page''' code (clicking for the next page),ElementClickInterceptedException and NoSuchElementException have continuously been thrown even though the element exist, the xpath is correct and it has even run successfully for several times. I added sleeps intentionally but this is still not working. May I know how should I solve this? Thanks

How to rotate various user agents using selenium python on each request

徘徊边缘 提交于 2020-01-22 02:29:10
问题 I want to make 10 requests to https://www.google.com/ but with random user agents using selenium and python. I've a loop and inside that loop I'm making 10 requests with random user agents (using fake-user agent). The main problem is for every request web driver is opening a new instance of google chrome and I want to do this in one single instance but with different user agents. How can I make this possible ? 1 google chrome instance and 10 requests with 10 random user agents. Here is my

Clicking Next Page Using Selenium

寵の児 提交于 2020-01-22 02:23:27
问题 I have tried a number of ways, from xpath to link text to get Selenium to locate the "Next Page" button, and then click until the last page, but just couldn't get this to work. This is the error that I have using xpath: no such element: Unable to locate element: {"method":"xpath","selector":"//li[@class="next"]/a"} (Session info: chrome=79.0.3945.88) Code: import requests, bs4, time, selenium #import libraries from selenium import webdriver from selenium.webdriver.support.select import Select

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 80

一世执手 提交于 2020-01-22 02:14:09
问题 when i go to command prompt and type chromedriver -v: ChromeDriver 79.0.3945.36 (3582db32b33893869b8c1339e8f4d9ed1816f143-refs/branch-heads/3945@{#614}) but when i try to run this code : from selenium import webdriver class InstaBot: def __init__(self): self.driver=webdriver.Chrome() self.driver.get("www.instagram.com") InstaBot() it gives me error like this: raise exception_class(message, screen, stacktrace) selenium.common.exceptions.SessionNotCreatedException: Message: session not created:

Create Login and Logout Loop Python Selenium

為{幸葍}努か 提交于 2020-01-22 02:14:07
问题 Hi I'm trying to Create a login and logout loop that I've had to www.shopee.com.my from selenium import webdriver import time from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.keys import Keys import csv import urllib.parse url = 'https://shopee.com.my/' driver = webdriver.Chrome('E: