safaridriver

How to double click an element on Selenium Webdriver using JavaScript for Safari

半城伤御伤魂 提交于 2021-02-11 15:35:59
问题 I'm facing a problem double clicking an element on Safari using Java / Webdriver 2.48. The tests are working fine on IE, Chrome, and Firefox but Actions are not supported on Safari. Currently I'm doing something like this executor.executeScript("arguments[0].dblclick();", element); or executor.executeScript("arguments[0].dblclick;", element); but is not working. Here is the error arguments[0].dblclick is not a function. (In 'arguments[0].dblclick()', 'arguments[0].dblclick' is undefined)

How to double click an element on Selenium Webdriver using JavaScript for Safari

大兔子大兔子 提交于 2021-02-11 15:34:38
问题 I'm facing a problem double clicking an element on Safari using Java / Webdriver 2.48. The tests are working fine on IE, Chrome, and Firefox but Actions are not supported on Safari. Currently I'm doing something like this executor.executeScript("arguments[0].dblclick();", element); or executor.executeScript("arguments[0].dblclick;", element); but is not working. Here is the error arguments[0].dblclick is not a function. (In 'arguments[0].dblclick()', 'arguments[0].dblclick' is undefined)

Unable to perform parallel execution on safari on mac using selenium

北战南征 提交于 2021-01-29 08:00:34
问题 I have around 1600 java TCs written using selenium. While executing test scripts in parallel (say thread count = 5), I am able to trigger 5 safari webdrivers and scripts are executing parallel. But, when the 6th (threadcount +1) script gets invoked, it is throwing below exception: Could not create a session: The Safari instance is already paired with another WebDriver session. I am quitting and closing the webdriver session after each test case. The same piece of code is working fine for

Basic browser authentication with Safari Capybara Selenium

陌路散爱 提交于 2020-05-28 07:53:39
问题 I've got a problem with browser authentication on Safari using Capybara/Selenium. I'm using this code to authenticate: visit "https://#{ENV['AUTH_USERNAME']}:#{ENV['AUTH_PASSWORD']}@my-staging-app.heroku.com" This works just fine on Chrome and FF but not on Safari. Any ideas how to bypass this? 回答1: Okey, I've found the solution for this. I had to use reversed proxy using e.g. Nginx and send proper headers :) Here is how I've done it: In this example I'll be using creds login: admin and

Basic browser authentication with Safari Capybara Selenium

巧了我就是萌 提交于 2020-05-28 07:53:21
问题 I've got a problem with browser authentication on Safari using Capybara/Selenium. I'm using this code to authenticate: visit "https://#{ENV['AUTH_USERNAME']}:#{ENV['AUTH_PASSWORD']}@my-staging-app.heroku.com" This works just fine on Chrome and FF but not on Safari. Any ideas how to bypass this? 回答1: Okey, I've found the solution for this. I had to use reversed proxy using e.g. Nginx and send proper headers :) Here is how I've done it: In this example I'll be using creds login: admin and

Selenium java SafariDriver wait for page to load after click

核能气质少年 提交于 2019-12-24 22:06:04
问题 When I run the following code, the execution abruptly ends unless I uncomment the Thread.sleep(). As result my code in the withdraw url servlet is not executed. The click is a submit button click which loads another page. EventFiringWebDriver webDriver = new EventFiringWebDriver(new SafariDriver()); try { webDriver.get("http://localhost:9988"); webDriver.findElement(By.id("amount")).sendKeys(new StringBuffer().append(amount.getRupees()).append('.').append(amount.getPaise()).toString());

Selenium 3.0.1 with safaridriver failing on waitForElementVisible()

梦想的初衷 提交于 2019-12-24 05:22:05
问题 Safari 10.0.1 macOS Sierra When running Codeception command: $I->waitForElementVisible(['css' => 'input[type=text][id=UserUsername]'], 30); in an acceptance test in Safari with Selenium 3.0.1 I receive an error. The screenshot taken at failure clearly displays the element in question. The same test/command is successful in both Firefox and Chrome. The error: Screenshot saved to /Applications/MAMP/htdocs/AutomatedTests/tests/_output/debug/FAILED1479307207.png Unable to retrieve Selenium logs :

Selenium 3.0.1 with safaridriver failing on waitForElementVisible()

旧时模样 提交于 2019-12-24 05:22:03
问题 Safari 10.0.1 macOS Sierra When running Codeception command: $I->waitForElementVisible(['css' => 'input[type=text][id=UserUsername]'], 30); in an acceptance test in Safari with Selenium 3.0.1 I receive an error. The screenshot taken at failure clearly displays the element in question. The same test/command is successful in both Firefox and Chrome. The error: Screenshot saved to /Applications/MAMP/htdocs/AutomatedTests/tests/_output/debug/FAILED1479307207.png Unable to retrieve Selenium logs :

Running safaridriver thorugh ssh always asks password

此生再无相见时 提交于 2019-12-19 04:52:09
问题 I would like to run safari selenium test in virtual machine on virtualbox. I have running macOS Sierra 10.12 inside virtual box. Tutorials say that you need to run /usr/bin/safaridriver once, to authorise it. I did that. And tests run perfectly, when I start them in terminal through GUI of virtual box. But when I ssh to that virtual box machine, I always got asked for password. It is a problem when running webdriver-manager / selenium standalone, when I cannot provide password. Vbox: Safari

Unable to start Selenium Safari WebDriver via python3

一世执手 提交于 2019-12-11 00:08:14
问题 I want to use Safari as the browser from python, and the code is fairly easy: from selenium import webdriver driver = webdriver.Safari() url = 'https://www.gmail.com/' driver.get(url) I am using the latest version of Safari, 11.0.3, In preferences-extension, I have WebDriver installed, In develop on menu, I have "allow Remote Automation" enabled. I'm using python 3.5, selenium 3.10.0 While running the code above, I got the following Error message: Traceback (most recent call last): File "