selenium-chromedriver

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

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

switch to new window after clicking on the hyperlink using selenium

旧时模样 提交于 2020-12-16 04:16:55
问题 Can anyone help me how to switch to new window after clicking on a hyperlink using selenium while doing automation . I have tried the following code but my test case is failing : public void openView(){ final WebElement visa=driver.findElement(By.id("pageContainer")); timeOut(10000); final List<WebElement> images=visa.findElements(By.className("nametag")); String handlewindow = driver.getWindowHandle(); for(String winHandle : driver.getWindowHandles()){ driver.switchTo().window(winHandle); }

switch to new window after clicking on the hyperlink using selenium

烂漫一生 提交于 2020-12-16 04:15:53
问题 Can anyone help me how to switch to new window after clicking on a hyperlink using selenium while doing automation . I have tried the following code but my test case is failing : public void openView(){ final WebElement visa=driver.findElement(By.id("pageContainer")); timeOut(10000); final List<WebElement> images=visa.findElements(By.className("nametag")); String handlewindow = driver.getWindowHandle(); for(String winHandle : driver.getWindowHandles()){ driver.switchTo().window(winHandle); }

switch to new window after clicking on the hyperlink using selenium

别来无恙 提交于 2020-12-16 04:15:18
问题 Can anyone help me how to switch to new window after clicking on a hyperlink using selenium while doing automation . I have tried the following code but my test case is failing : public void openView(){ final WebElement visa=driver.findElement(By.id("pageContainer")); timeOut(10000); final List<WebElement> images=visa.findElements(By.className("nametag")); String handlewindow = driver.getWindowHandle(); for(String winHandle : driver.getWindowHandles()){ driver.switchTo().window(winHandle); }

Handling contents of Embed tag in selenium python

五迷三道 提交于 2020-12-15 06:06:46
问题 How can I access embedded part from web page and contents using selenium and python <embed src="RainPastDailyMonth.php" width="100%" height="100%"> Embedded part has input button elements which I need to access using selenium but getting Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/center/b/input"} for below code driver.find_element(By.XPATH, '/html/body/center/b/input') where '/html/body/center/b/input' is XPATH for input button 回答1: This is

Python/Selenium - Cant click' Accept cookies' button on www.instagram.com

筅森魡賤 提交于 2020-12-13 05:38:49
问题 Im trying to login on instagram using python selenium. But i have to Accept the cookies in order to continue. This is my code class InstaBot: def __init__(self, username, pw): self.driver = webdriver.Chrome() self.driver.get('https://www.instagram.com/') sleep(2) #this is the code that im trying to use, so to click the accept button self.driver.find_element_by_xpath("/html/body/div[2]/div/div/div/div[2]/button[1]").click() self.driver.find_element_by_xpath("//input[@name=\"username\"]")\

Emulate a focused Page option not available in Chrome Developer Tools

心不动则不痛 提交于 2020-12-13 04:59:14
问题 There used to be an option, "Emulate a focused page," under "Global preferences" in Chrome developer tools. However, I am not able to find that option anymore. Any ideas? 回答1: There are two ways to invoke it now: A checkbox in Rendering panel Command panel: press Ctrl Shift P (or ⌘ ⌥ P ) type emfo to find the Emulate a focused page item press Enter 来源: https://stackoverflow.com/questions/64456886/emulate-a-focused-page-option-not-available-in-chrome-developer-tools

Emulate a focused Page option not available in Chrome Developer Tools

霸气de小男生 提交于 2020-12-13 04:57:23
问题 There used to be an option, "Emulate a focused page," under "Global preferences" in Chrome developer tools. However, I am not able to find that option anymore. Any ideas? 回答1: There are two ways to invoke it now: A checkbox in Rendering panel Command panel: press Ctrl Shift P (or ⌘ ⌥ P ) type emfo to find the Emulate a focused page item press Enter 来源: https://stackoverflow.com/questions/64456886/emulate-a-focused-page-option-not-available-in-chrome-developer-tools

Emulate a focused Page option not available in Chrome Developer Tools

帅比萌擦擦* 提交于 2020-12-13 04:57:15
问题 There used to be an option, "Emulate a focused page," under "Global preferences" in Chrome developer tools. However, I am not able to find that option anymore. Any ideas? 回答1: There are two ways to invoke it now: A checkbox in Rendering panel Command panel: press Ctrl Shift P (or ⌘ ⌥ P ) type emfo to find the Emulate a focused page item press Enter 来源: https://stackoverflow.com/questions/64456886/emulate-a-focused-page-option-not-available-in-chrome-developer-tools