selenium-chromedriver

How to disable notification popup in Chrome Browser

≡放荡痞女 提交于 2019-12-13 10:09:07
问题 from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.chrome.options import Options import time chrome_options = webdriver.ChromeOptions() prefs = {"profile.default_content_setting_values.notifications" : 2} chrome_options.add_experimental_option("prefs",prefs) driver = webdriver.Chrome("C:\\chromedriver\\chromedriver.exe") driver.maximize_window() driver.get("https://www.arttoframe.com/") time.sleep(6) driver.close() Console Logs : C:\Users

How to hide cmd.exe/console log of chromedriver in selenium in python?

*爱你&永不变心* 提交于 2019-12-13 09:38:29
问题 How to hide cmd.exe/console log of chromedriver in selenium in python? I tried: driver.service.stop() Full Code: from selenium import webdriver from selenium.webdriver.common.keys import Keys from time import sleep from selenium.common.exceptions import TimeoutException from selenium.webdriver.support.ui import WebDriverWait import time print("Opening...") driver = webdriver.Chrome() driver.get('https://google.com') driver.service.stop() But it didn't close the console log/ cmd.exe 回答1: You

Getting Past Captcha - Selenium

让人想犯罪 __ 提交于 2019-12-13 08:59:12
问题 I'm trying to automate a login process on a website using Selenium. I want to enter my data, then enter the captcha myself. However, when I click on the captcha I am given a large amount of captchas and errors. Is there any way for me to not run into constant captchas? 回答1: Captchas are specifically designed to break automation. I would ask the Product Owner to add some kind of a cookie or mechanism to cause the chaptcha to not be there. 回答2: Unfortunately, as @Dominic said, CAPTCHA's can't

Unable to handle Sign-in pop-up using selenium web-driver for any of the browsers

Deadly 提交于 2019-12-13 08:59:08
问题 I am trying to hit a URL which asks for authentication pop-up which is neither a window pop-up nor a browser pop-up . The code driver.get("myURL") will hang/pause unless this popup is entered with user name and password manually . Once the credentials are entered manually , the automation script continues - the next line of driver.get("myURL"). Everywhere AutoIT and other alert methods are mentioned.But the problem is , the code never reaches the next line of driver.get("myURL") unless it is

Driver info: driver.version: unknown using ChromeDriver v78.0.3904.70 and Chrome browser v78.0.3904.97

纵饮孤独 提交于 2019-12-13 08:34:11
问题 I am using java 1.8 with chrome browser version 78.0.3904.97 . I am trying to execute my selenium script code with the chrome driver version 78.0.3904.70 . but while execution I am facing below issue and chrome crases immediately Picked up JAVA_TOOL_OPTIONS: -Djdk.http.auth.tunneling.disabledSchemes="" java version "1.8.0_131" Java(TM) SE Runtime Environment (build 1.8.0_131-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode) If you check the below logs then you will get to

Chrome browser launches with blank page in Selenium webdriver

无人久伴 提交于 2019-12-13 07:49:44
问题 I am facing issues while executing one of my Selenium test script on chrome browser. When selenium launches chrome browser then it opened with no URL on it i.e. Blank page. Also getting the pop up that chromedriver.exe has stopped working. Can anyone please help on this. Thanks in advance. 回答1: please try chromedriver 2.29, it should work fine https://chromedriver.storage.googleapis.com/index.html?path=2.29/ 来源: https://stackoverflow.com/questions/43511081/chrome-browser-launches-with-blank

(Selenium ruby) How to add debuggerAddress experimental option?

感情迁移 提交于 2019-12-13 07:31:27
问题 Discription I want to attach selenium to existing session of chrome, and then tweak pages using my chrome profile, but from terminal I have found that this is feasible using debuggerAddress Excerpt - Launch Chrome from command prompt: chrome.exe --remote-debugging-port=8181 Sample Code: ChromeOptions options = new ChromeOptions(); options.setExperimentalOption("debuggerAddress", "127.0.0.1:8181"); WebDriver driver = new ChromeDriver(options); driver.manage().timeouts().implicitlyWait(1,

Appium throws “chrome not reachable” sporadically when switch a context

十年热恋 提交于 2019-12-13 07:05:01
问题 I'm using appium 1.4.16 and smartphone with Android 6. Running this code: public boolean fluentWaitChangeContext(String context, int timeout) { Wait wait = new FluentWait(driver) .withTimeout(timeout, TimeUnit.SECONDS) .pollingEvery(5, TimeUnit.SECONDS) .ignoring(NoSuchElementException.class, NoSuchContextException.class); boolean isFound = false; try { wait.until(input -> { if (driver.getContextHandles().size() == 2) { driver.context(context); // driver.context(driver.getContextHandles()

chrome speech recognition WebKitSpeechRecognition() not accepting input of fake audio device --use-file-for-fake-audio-capture or audio file

夙愿已清 提交于 2019-12-13 05:09:15
问题 I would like to use chrome speech recognition WebKitSpeechRecognition() with the input of an audio file for testing purposes. I could use a virtual microphone but this is really hacky and hard to implement with automation, but when I tested it everything worked fine and the speechrecognition converted my audio file to text. now I wanted to use the following chrome arguments: --use-file-for-fake-audio-capture="C:/url/to/audio.wav" --use-fake-device-for-media-stream --use-fake-ui-for-media

Selenium/Testng - IF statement not working when using parameter from testng.xml

六眼飞鱼酱① 提交于 2019-12-13 04:46:30
问题 I'm using Selenium WebDriver with Testng (started using an .xml file) to test a site using multiple browsers. I'm trying to create a method which will take in a parameter from the xml file, and using an IF statement, detect the browser, create the relevant driver, and return it. The trouble I'm having is when I try to pass through the parameter to the method. If I pass through "Chrome" for example, the IF statement works fine and the driver is created. However if I use the parameter itself,