selenium-webdriver

urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection …>: Failed to establish a new connection: [Errno 111] Connection refused

风流意气都作罢 提交于 2020-12-07 04:55:57
问题 Why does one see this error in Selenium; urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0xsome_hex_address>: Failed to establish a new connection: [Errno 111] Connection refused When using various functions? 回答1: Please ensure you have not somewhere terminated your session. For example (in Python); import time from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By driver = webdriver

urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection …>: Failed to establish a new connection: [Errno 111] Connection refused

帅比萌擦擦* 提交于 2020-12-07 04:49:32
问题 Why does one see this error in Selenium; urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0xsome_hex_address>: Failed to establish a new connection: [Errno 111] Connection refused When using various functions? 回答1: Please ensure you have not somewhere terminated your session. For example (in Python); import time from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By driver = webdriver

How can I instantiate a new ChromeDriver using a relative path in C#?

我们两清 提交于 2020-12-05 12:46:07
问题 It works using an absolute path like: WebDriver = new ChromeDriver(@"C:\Users\<my user>\Documents\<my project>\WebDrivers\Chrome\"); But since I run my tests on a TFS build server too, I need it to be a relative path. 回答1: Add the drivers into your solution and in the properties window, define that you want to copy the files to the output directory. File Properties In the picture above, the drivers are in the resources directory: /my solution /resources /chromedriver.exe /IEDriverServer.exe

What's the get_Text() equivalent in python bindings for Selenium/Webdriver

青春壹個敷衍的年華 提交于 2020-12-05 11:56:10
问题 I would like to move from Selenium 1 to Selenium 2. I use python binding however I can not find any get_text() functions. eg. selenium.find_elements_by_css_selector("locator").get_text() Is there such function in python bindings for Selenium/Webdriver ? 回答1: use the '.text' property. element.text 回答2: This line of code... selenium.find_elements_by_css_selector("locator").get_text() ...have exactly two (2) issues to be addressed. Details As per the current documentation get_Text() can be

How to launch already installed app from iPhone using appium

狂风中的少年 提交于 2020-12-04 14:29:37
问题 I am writing an automation script using Java + TestNG + Appium. In a test scenario, I am trying to launch already installed application on iphone. (Box in this case). Box contains some MS office file which I need to access. I am not very sure how can I achieve this. I tried multiple options such as extracting .app file from iTunes and deploying using Appium, but no success. Can someone please guide me, if this is possible. If yes, how? 回答1: Automate a preinstalled app with following scenario.

How to launch already installed app from iPhone using appium

我是研究僧i 提交于 2020-12-04 14:27:41
问题 I am writing an automation script using Java + TestNG + Appium. In a test scenario, I am trying to launch already installed application on iphone. (Box in this case). Box contains some MS office file which I need to access. I am not very sure how can I achieve this. I tried multiple options such as extracting .app file from iTunes and deploying using Appium, but no success. Can someone please guide me, if this is possible. If yes, how? 回答1: Automate a preinstalled app with following scenario.

How to launch already installed app from iPhone using appium

别等时光非礼了梦想. 提交于 2020-12-04 14:27:22
问题 I am writing an automation script using Java + TestNG + Appium. In a test scenario, I am trying to launch already installed application on iphone. (Box in this case). Box contains some MS office file which I need to access. I am not very sure how can I achieve this. I tried multiple options such as extracting .app file from iTunes and deploying using Appium, but no success. Can someone please guide me, if this is possible. If yes, how? 回答1: Automate a preinstalled app with following scenario.

How to launch already installed app from iPhone using appium

孤街浪徒 提交于 2020-12-04 14:26:12
问题 I am writing an automation script using Java + TestNG + Appium. In a test scenario, I am trying to launch already installed application on iphone. (Box in this case). Box contains some MS office file which I need to access. I am not very sure how can I achieve this. I tried multiple options such as extracting .app file from iTunes and deploying using Appium, but no success. Can someone please guide me, if this is possible. If yes, how? 回答1: Automate a preinstalled app with following scenario.

How can I set socks5 proxy for selenium webdriver? Python

旧街凉风 提交于 2020-12-04 02:25:34
问题 I really can’t to set socks5 proxy(http too...) for my chrome webdriver in selenium for python. I tried many different ways... But I think I do something bad. Example 1: self.options.add_argument('--proxy-server=http://'+proxy) Example 2: webdriver.DesiredCapabilities.CHROME['proxy'] = { "socksProxy": proxy, "ftpProxy": proxy, "sslProxy": proxy, "noProxy": None, "proxyType": "MANUAL", "class": "org.openqa.selenium.Proxy", "autodetect": False } Please describe fully the working example of

How can I set socks5 proxy for selenium webdriver? Python

99封情书 提交于 2020-12-04 02:24:21
问题 I really can’t to set socks5 proxy(http too...) for my chrome webdriver in selenium for python. I tried many different ways... But I think I do something bad. Example 1: self.options.add_argument('--proxy-server=http://'+proxy) Example 2: webdriver.DesiredCapabilities.CHROME['proxy'] = { "socksProxy": proxy, "ftpProxy": proxy, "sslProxy": proxy, "noProxy": None, "proxyType": "MANUAL", "class": "org.openqa.selenium.Proxy", "autodetect": False } Please describe fully the working example of