selenium-webdriver

Python - which is considered better for scrapping: selenium or beautifulsoup with selenium? [closed]

天大地大妈咪最大 提交于 2020-01-30 11:01:46
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 2 years ago . This question is for Python 3.6.3, bs4 and Selenium 3.8 on Win10. I am trying to scrape pages with dynamic content. What I am trying to scrape is numbers and text (from http://www.oddsportal.com for example). From my understanding using requests+beautifulsoup will not do the

How to upload file using python selenium-webdriver when there is no input type but instead it has a button type in HTML?

大城市里の小女人 提交于 2020-01-30 10:56:38
问题 How to upload file using python selenium-webdriver when there is no input type but instead it has a button type in HTML? I'm trying to upload a file to a webpage using Selenium but the HTML type is a button not an Input file. Below is the HTML Code Button looks like this My code browser.find_element_by_class_name("ng-scope").send_keys('C:\\Users\\Desktop\\test.png') But after I run the code the file is not uploaded. Please advise on where i'm going wrong? Thanks in advance -M 回答1: There is a

How to send text to the Password field within https://mail.protonmail.com registration page?

∥☆過路亽.° 提交于 2020-01-30 10:11:11
问题 I make proton signup form but it's not typing a password It's doing all good its typing username but it's not typing a password It's typing username but it's not typing password. Code trials: '''python from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC chrome_options = webdriver.ChromeOptions() chrome_options.add_argument("start-maximized") # chrome

'UnknownError',message: 'An unknown server-side error occurred while processing the command.',orgStatusMessage: 'connection refused with webdriver.io

╄→尐↘猪︶ㄣ 提交于 2020-01-30 09:20:06
问题 I am following this guide: http://webdriver.io/guide.html and firefox version I am using 62.0 I followed following steps: I downloaded latest selenium-standalone-server version 3.14. I have downloaded latest gecko driver version 0.22.0 and extracted it in project folder Ran selenium standalone version using command java -jar -Dwebdriver.gecko.driver=./geckodriver selenium-server-standalone-3.5.3.jar Then run the command npm install webdriverio Created a test file test.js with code var

Internet Explorer not launched using selenium even though ignoreProtect mode settings are enabled

孤者浪人 提交于 2020-01-30 09:08:40
问题 Sample Code : from selenium import webdriver from selenium.webdriver.common.desired_capabilities import DesiredCapabilities caps = DesiredCapabilities.INTERNETEXPLORER caps['ignoreProtectedModeSettings'] = True browser = webdriver.Ie(capabilities=caps) browser.get('http://www.google.com') Internet Explorer is not launched and I am facing the below error : SessionNotCreatedException: Message: Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones.

Internet Explorer not launched using selenium even though ignoreProtect mode settings are enabled

好久不见. 提交于 2020-01-30 09:08:09
问题 Sample Code : from selenium import webdriver from selenium.webdriver.common.desired_capabilities import DesiredCapabilities caps = DesiredCapabilities.INTERNETEXPLORER caps['ignoreProtectedModeSettings'] = True browser = webdriver.Ie(capabilities=caps) browser.get('http://www.google.com') Internet Explorer is not launched and I am facing the below error : SessionNotCreatedException: Message: Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones.

Internet Explorer not launched using selenium even though ignoreProtect mode settings are enabled

試著忘記壹切 提交于 2020-01-30 09:07:06
问题 Sample Code : from selenium import webdriver from selenium.webdriver.common.desired_capabilities import DesiredCapabilities caps = DesiredCapabilities.INTERNETEXPLORER caps['ignoreProtectedModeSettings'] = True browser = webdriver.Ie(capabilities=caps) browser.get('http://www.google.com') Internet Explorer is not launched and I am facing the below error : SessionNotCreatedException: Message: Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones.

How to resolve org.openqa.selenium.ElementNotVisibleException using Selenium with Java in Amazon Sign In

杀马特。学长 韩版系。学妹 提交于 2020-01-30 09:04:34
问题 package newpackage; import java.util.List; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.interactions.Actions; public class OpenAmazon { public static void main(String[] args) { WebDriver driver; System.setProperty("webdriver.chrome.driver", "C:\\Program Files\\chromedriver_win32\\chromedriver.exe"); driver=new

Exception in thread “main” java.lang.NullPointerException using WebDriver Driver=new Chrome() and maximize Chrome browser window using selenium script

独自空忆成欢 提交于 2020-01-30 08:19:06
问题 How to maximize Chrome browser window using selenium script? This is my code: package newpackage; import org.openqa.selenium.WebDriver; public class MyClass { public static void main(String[] args) { WebDriver Driver=new Chrome(); Driver.get("http://www.google.com"); Driver.manage().window().maximize(); } } However, I get this error: Exception in thread "main" java.lang.NullPointerException at newpackage.MyClass.main(MyClass.java:10) 回答1: To work with Selenium 3.4.0 you need to download the

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 while executing code using GeckoDriver and Firefox

半城伤御伤魂 提交于 2020-01-30 08:17:34
问题 Code Trials : public class loginmethod { @Test public void login() throws InterruptedException { System.setProperty("webdriver.gecko.driver", "D:\\Tools\\geckodriver"); WebDriver driver = new FirefoxDriver(); driver.manage().window().maximize(); driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS); } } Binary Version Details : FireFox : 60.0 Selenium Jar : 2.45 GeckoDriver : 20.1 When I run code using Firefox driver following error is given: org.openqa.selenium.firefox