selenium-chromedriver

WebDriver simulate touch events in Desktop Browser

微笑、不失礼 提交于 2019-12-09 07:45:31
I'm trying to simulate some touch events like swap, tap in web-based application using Chrome and Firefox browsers. I've tried to simulate touch events with Actions , Hummber.js , " Yahoo " lib(YUI) but none of them works for me. What is the best way to simulate touch events with webdriver in desktop browsers? I'm using phantom limb which transforms mouse events to touch events. It worked for me. I thing the best way to simulate touch events in Chrome is to use built-in emulations mechanism. Like in this article. Unfortunately I can't find the way to turn on this feature by webdriver. Found

Getting rid of chromedirver console window with pyinstaller

社会主义新天地 提交于 2019-12-09 07:15:26
I'm using chromedriver in headless mode . I compile the script using pyinstaller as one exe file. Everything works fine, except that I get the following console window whenever I open a chrome page: I've tried the options --windowed alone, --noconsole alone, --windowed and --noconsole together but I still get this window. How can I get rid of it? I was able to find the following answer and it's working perfectly for me: To avoid getting console windows for chromedriver, open the file Python\Lib\site-packages\selenium\webdriver\common\service.py and change self.process = subprocess.Popen(cmd,

Selenium ChromeDriver switch tabs

半城伤御伤魂 提交于 2019-12-09 05:14:15
问题 When I click on a link in my test, it opens a new tab. I want ChromeDriver to then focus on that tab. I have tried the following code to get ChromeDriver to change tabas using the ctrl+tab shortcut: Actions builder = new Actions(driver); builder.KeyDown(Keys.Control).KeyDown(Keys.Tab).KeyUp(Keys.Tab).KeyUp(Keys.Control);//switch tabs IAction switchTabs = builder.Build(); switchTabs.Perform(); But this throws the following exception: ekmLiveChat.tests.UITests.EndToEndTest.EndToEnd: System

Chromedriver not deleting scoped* dir in temp folder after test is complete

半城伤御伤魂 提交于 2019-12-09 05:10:52
问题 With latest chromedriver.exe running into out of disk space issues as chromedriver is not deleting the folder named scoped_* at the end of the execution. It is occupying almost 20 GB of space for 400 tests. I tried with both 2.28 and 2.29 versions of chromedriver. I am exiting the driver properly with driver.close() and driver.Quit() too. Chrome browser version is 57. 回答1: I managed this by adding deletion of temp folders that begins with "scoped_dir" after quitting driver like: public static

Define download directory for chromedriver selenium with python

二次信任 提交于 2019-12-09 04:23:06
问题 Everything is in the title! Is there a way to define the download directory for selenium-chromedriver used with python? In spite of many research, I haven't found something conclusive... As a newbie, I've seen many things about "the desired_capabilities" or "the options" for Chromedriver but nothing has resolved my problem... (and I still don't know if it will!) To explain a little bit more my issue: I have a lot of url to scan (200 000) and for each url a file to download. I have to create a

Chromedriver 76 breaks my test suite “javascript error: circular reference”

泄露秘密 提交于 2019-12-09 03:39:55
问题 I now get "javascript error: circular reference(Session info: chrome=76.0.3809.100)" whenever I try and click on any element on my company's webapp. This is code that was working fine on previous chromedriver versions I have tried the solutions mentioned in the "Duplicate" question linked to here, to be honest i think that question was marked duplicate erroneously. Protractor: Version 6.0.0 (also tried on 5.4.2) webdriver-manager: using global installed version 12.1.6 Selenium server version:

How do I drag a jQuery slider handle from within Capybara and ChromeDriver?

狂风中的少年 提交于 2019-12-09 03:06:04
问题 I am able to execute the following code to move the slider handle, but the events triggered in the browser are not taking place. page.execute_script(%Q($('#slider_handicap').slider('values',1,30))) That correctly sets the right handle to 30, but I need it to behave as if I were actually taking the mouse and dragging the handle to 30 then releasing. 回答1: I extended capybara dragging before. It can move elements by a given offset. You could try module CapybaraExtension def drag_by(right_by,

How do I simulate hitting enter in an input field with Capybara and ChromeDriver?

僤鯓⒐⒋嵵緔 提交于 2019-12-08 22:56:57
问题 I have the following helper method to input a string into an input field and press the enter key, but it seems the enter key is never pressed. I see the string entered into the input field, but the events that take place upon hitting enter never happened. I've tested in an actual browser that the enter key correctly fires the expected events. I'm not sure what I'm missing. def fill_and_trigger_enter_keypress(selector, value) page.execute_script %Q( var input = $('#{selector}'); input.val('#

chromedriver: various lib dependencies are missing on ubuntu 14.04 64-bit

被刻印的时光 ゝ 提交于 2019-12-08 21:57:39
问题 so I'm trying to run chromedriver 2.20 downloaded from wget http://chromedriver.storage.googleapis.com/2.20/chromedriver_linux64.zip and on my ubuntu 14.04 x86_64 x86_64 x86_64 GNU/Linux I get the following message ./chromedriver: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory digging in further I see that it's missing a whole bunch. me@me:/var/chrome# ldd ./chromedriver linux-vdso.so.1 => (0x00007ffc0e5aa000) librt.so.1 => /lib/x86

Silencing Chrome driver console outputs when I run my tests

江枫思渺然 提交于 2019-12-08 20:02:04
问题 I am using latest versions of Chrome(32.0.1700.107) and Chrome driver(V2.8). But when I run my sample test with following code in Ruby: require 'selenium-webdriver' WAIT = Selenium::WebDriver::Wait.new(timeout: 100) $driver = Selenium::WebDriver.for :chrome $driver.manage.window.maximize $driver.navigate.to 'https://www.google.co.in' def apps_hover ele_hover = $driver.find_element(:xpath, ".//*[@id='gbwa']/div[1]/a") $driver.action.move_to(ele_hover).perform sleep 5 puts"Pass" end apps_hover