selenium-chromedriver

How can I add an extension to my chromedriver at the Robot Framework with Selenium2Library and launch remotely

流过昼夜 提交于 2021-02-08 08:26:23
问题 I got stuck with scenario like How can I add an extension to my chromedriver at the Robot level with Selenium2Library , but i am trying to launch browser on a remote machine. Answer present on the above question works well on local machine. But to how to add an extension to chrome browser and launch on remote machine. Using python to get chrome options def launchbrowserwithextension(): options = webdriver.ChromeOptions() options.add_argument('--load-and-launch-app=path_to_extension') return

Setting chrome capabilities in application.properties file using QAF Automation framework is not working

穿精又带淫゛_ 提交于 2021-02-08 05:17:46
问题 I'm new to using QAF Automation framework. I followed the documentation on this page - https://qmetry.github.io/qaf/latest/setting_driver_capabilities.html My requirement is: I have to download a file in my test and the download should go to my project's download folder and not on macbook/test machine's download folder. I'm using chromeDriver and have to set chrome capabilities in the application.properties file within QAF framework. I added the below but it's not working chrome.capabilities

Setting chrome capabilities in application.properties file using QAF Automation framework is not working

こ雲淡風輕ζ 提交于 2021-02-08 05:17:33
问题 I'm new to using QAF Automation framework. I followed the documentation on this page - https://qmetry.github.io/qaf/latest/setting_driver_capabilities.html My requirement is: I have to download a file in my test and the download should go to my project's download folder and not on macbook/test machine's download folder. I'm using chromeDriver and have to set chrome capabilities in the application.properties file within QAF framework. I added the below but it's not working chrome.capabilities

Is it possible to disable loading images (jpg and png only) on Selenium and Chrome webdrive?

故事扮演 提交于 2021-02-08 05:12:31
问题 In my efforts to improve performance of my selenium testing application I was wondering if it is possible to avoid loading certain files such as images (jpg and png). The parameter "--disable-images" disable all images, including "gif", which in my canse can be a google analytics tag, and I must capture that. 回答1: Yes, you can do it by specifying profile.managed_default_content_settings.image in ChromeOptions . Example: chromeOptions = webdriver.ChromeOptions() prefs = {"profile.managed

Is it possible to disable loading images (jpg and png only) on Selenium and Chrome webdrive?

假如想象 提交于 2021-02-08 05:06:59
问题 In my efforts to improve performance of my selenium testing application I was wondering if it is possible to avoid loading certain files such as images (jpg and png). The parameter "--disable-images" disable all images, including "gif", which in my canse can be a google analytics tag, and I must capture that. 回答1: Yes, you can do it by specifying profile.managed_default_content_settings.image in ChromeOptions . Example: chromeOptions = webdriver.ChromeOptions() prefs = {"profile.managed

select randomly from dropdown list?

大城市里の小女人 提交于 2021-02-08 04:51:16
问题 My html sample code is, <div class="list"> <div class="dropdown"> <ul role="menu"> <li class="rsbListItem">one</li> <li class="rsbListItem">two</li> <li class="rsbListItem">three</li> <li class="rsbListItem">four</li> <li class="rsbListItem">five</li> <li class="rsbListItem">six</li> <li class="rsbListItem">seven</li> <li class="rsbListItem">eight</li> </ul> </div> </div> How can i write Selenium scripts for this, and each time when i run it should select randomly. I have tried to pick random

Chromedriver Offline Network Conditions seems to not block Service Worker fetches

人走茶凉 提交于 2021-02-08 03:42:34
问题 I have a site with a Service Worker that caches some static resources on install. Some other resources are not cached, like data requests. So if you test the site using offline mode in Chrome, most of the page is properly displayed, but data is not there, and some errors appear in the console because of those failed requests. All right so far. But then I've created a test with Selenium and Chromedriver. I load that site, I visit the home page, Service Worker is properly installed, and then I

Chromedriver Offline Network Conditions seems to not block Service Worker fetches

风格不统一 提交于 2021-02-08 03:42:30
问题 I have a site with a Service Worker that caches some static resources on install. Some other resources are not cached, like data requests. So if you test the site using offline mode in Chrome, most of the page is properly displayed, but data is not there, and some errors appear in the console because of those failed requests. All right so far. But then I've created a test with Selenium and Chromedriver. I load that site, I visit the home page, Service Worker is properly installed, and then I

Chromedriver Offline Network Conditions seems to not block Service Worker fetches

女生的网名这么多〃 提交于 2021-02-08 03:42:28
问题 I have a site with a Service Worker that caches some static resources on install. Some other resources are not cached, like data requests. So if you test the site using offline mode in Chrome, most of the page is properly displayed, but data is not there, and some errors appear in the console because of those failed requests. All right so far. But then I've created a test with Selenium and Chromedriver. I load that site, I visit the home page, Service Worker is properly installed, and then I

Python selenium CTRL+C closes chromedriver

北城以北 提交于 2021-02-07 20:27:06
问题 How can I catch CTRL+C (a KeyboardInterrupt) without causing the chromedriver to close. It closes the chromedriver when I run my script.py through cmd. driver = webdriver.Chrome() try: while True: #do stuff with chromedriver except KeyboardInterrupt: print "User pressed CTRL + C" #do other stuff with chromedriver It does catch the KeyboardInterrupt in my script, thus my script continues but the chromedriver also gets it and close itself. EDIT 1: The solution here doesn't work when you run the