selenium-webdriver

Change default download location on Edge chromium

北慕城南 提交于 2020-12-26 12:12:41
问题 I would like to ask if someone has tried to change the default download location on Microsoft Edge Chromium driver using selenium 3.X. On Chrome browser, we could use something like this HashMap<String, Object> chromePrefs = new HashMap<String, Object>(); chromePrefs.put("download.default_directory", savePAth); chromePrefs.put("prompt_for_download", false); options.setExperimentalOption("prefs", chromePrefs); Info: Microsoft Edge Browser version: 80.0.361.66 (Official build) (64-bit) Thanks

How to find broken links in Selenium + Python

五迷三道 提交于 2020-12-25 01:20:24
问题 I'm trying to find a broken link in Selenium and Python but getting an error in the code: import requests from selenium import webdriver chrome_driver_path = "D:\\drivers\\chromedriver.exe" driver=webdriver.Chrome(chrome_driver_path) driver.get('https://google.co.in/') links = driver.find_elements_by_css_selector("a") images = driver.find_elements_by_css_selector("img") for link in links: r = requests.head(link.get_attribute('href') print(r.status_code == 200) Unable to find broken links on

How to find broken links in Selenium + Python

二次信任 提交于 2020-12-25 01:19:22
问题 I'm trying to find a broken link in Selenium and Python but getting an error in the code: import requests from selenium import webdriver chrome_driver_path = "D:\\drivers\\chromedriver.exe" driver=webdriver.Chrome(chrome_driver_path) driver.get('https://google.co.in/') links = driver.find_elements_by_css_selector("a") images = driver.find_elements_by_css_selector("img") for link in links: r = requests.head(link.get_attribute('href') print(r.status_code == 200) Unable to find broken links on

Failed to read descriptor from node connection: A device attached to the system is not functioning error using ChromeDriver Chrome through Selenium

倾然丶 夕夏残阳落幕 提交于 2020-12-21 05:10:13
问题 from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait import time import pyautogui import requests import nltk import urllib.request import random driver=webdriver.Chrome() driver.get('https://www.karsanj.net/login.php') userm=driver.find_element_by_id('username') userm.send_keys('gdbcfss') time.sleep(2) passwoord=driver.find_element_by_id('password') passwoord.send_keys('fbxeedf') time.sleep(2) sal =driver.find_element_by_id("salTahsili") sal.click() time

Failed to read descriptor from node connection: A device attached to the system is not functioning error using ChromeDriver Chrome through Selenium

。_饼干妹妹 提交于 2020-12-21 05:08:35
问题 from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait import time import pyautogui import requests import nltk import urllib.request import random driver=webdriver.Chrome() driver.get('https://www.karsanj.net/login.php') userm=driver.find_element_by_id('username') userm.send_keys('gdbcfss') time.sleep(2) passwoord=driver.find_element_by_id('password') passwoord.send_keys('fbxeedf') time.sleep(2) sal =driver.find_element_by_id("salTahsili") sal.click() time

Failed to read descriptor from node connection: A device attached to the system is not functioning error using ChromeDriver Chrome through Selenium

偶尔善良 提交于 2020-12-21 05:04:43
问题 from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait import time import pyautogui import requests import nltk import urllib.request import random driver=webdriver.Chrome() driver.get('https://www.karsanj.net/login.php') userm=driver.find_element_by_id('username') userm.send_keys('gdbcfss') time.sleep(2) passwoord=driver.find_element_by_id('password') passwoord.send_keys('fbxeedf') time.sleep(2) sal =driver.find_element_by_id("salTahsili") sal.click() time

Message “org.openqa.selenium.InvalidSelectorException: invalid selector: Unable to locate an element with the XPath expression” using sendKeys

假装没事ソ 提交于 2020-12-21 02:15:51
问题 I am having trouble trying to upload a file using Selenium. I am not able to use the sendKeys() function to pass the path due to the browse button not having an input tag. It's written in Angular. Here's the browse button element: <a id="attachmentUpload-browse0" name="attachmentUpload-browse0" ng-click="clickBrowse($index)" class="btn-pri" xpath="1"></a> I did find an input tag right below the code above in the source, but I am getting errors when trying to use .sendKeys() . <input type=

Message “org.openqa.selenium.InvalidSelectorException: invalid selector: Unable to locate an element with the XPath expression” using sendKeys

我们两清 提交于 2020-12-21 02:13:31
问题 I am having trouble trying to upload a file using Selenium. I am not able to use the sendKeys() function to pass the path due to the browse button not having an input tag. It's written in Angular. Here's the browse button element: <a id="attachmentUpload-browse0" name="attachmentUpload-browse0" ng-click="clickBrowse($index)" class="btn-pri" xpath="1"></a> I did find an input tag right below the code above in the source, but I am getting errors when trying to use .sendKeys() . <input type=

Message “org.openqa.selenium.InvalidSelectorException: invalid selector: Unable to locate an element with the XPath expression” using sendKeys

时光毁灭记忆、已成空白 提交于 2020-12-21 02:13:02
问题 I am having trouble trying to upload a file using Selenium. I am not able to use the sendKeys() function to pass the path due to the browse button not having an input tag. It's written in Angular. Here's the browse button element: <a id="attachmentUpload-browse0" name="attachmentUpload-browse0" ng-click="clickBrowse($index)" class="btn-pri" xpath="1"></a> I did find an input tag right below the code above in the source, but I am getting errors when trying to use .sendKeys() . <input type=

org.openqa.selenium.NoSuchSessionException: no such session error in Selenium automation tests using ChromeDriver Chrome with Java

纵饮孤独 提交于 2020-12-18 07:42:14
问题 Getting "No such session exception" while running selenium in my pipeline. I find many solutions related it but none worked for me. Any assistance or idea? Exception trace: org.openqa.selenium.NoSuchSessionException: no such session (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 3.10.0-957.21.3.el7.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 0 milliseconds Build info: version: '3