selenium-chromedriver

ng model - check the checkbox Xpath not working in chrome and IE driver

Deadly 提交于 2019-12-25 08:17:27
问题 Html code: <table id="tblusref" style="width: auto;" onmouseover="UsortBinders()" role="grid"> <thead> <tbody aria-live="polite" aria-relevant="all"> <tr class="ng-scope AssociateHighlight odd" > <td class="ng-binding" style="width: 10px">1</td> <td class=" text-center" style="width: 2px"> <input class="ng-pristine ng-untouched ng-valid" type="checkbox" ng-change="CheckChange(Ref.RecordNo,Ref.Freeze,Ref.isSelected,'US')" ng-model="Ref.isSelected"> </td> </tr> </tbody> </table> inside the

Selenium: How do I start Chrome with RailsPanel Extension loaded?

给你一囗甜甜゛ 提交于 2019-12-25 07:33:59
问题 What is the right way to do this? Capybara.register_driver :chrome do |app| client = Selenium::WebDriver::Remote::Http::Default.new extension_path = '/Users/jill/Documents/rails_panel-master/rails_panel' caps = Selenium::WebDriver::Remote::Capabilities.chrome("chromeOptions" => {"args" => ['--load-extension=' + extension_path]}) Capybara::Selenium::Driver.new(app, :browser => :chrome, http_client: client, desired_capabilities: caps ) end Also, --load-extension with switches worked, but there

Selenium right click scrolling down before selecting options

本小妞迷上赌 提交于 2019-12-25 07:12:21
问题 I've seen this thread here and when I try to use sendKeys(Keys.ARROW_DOWN) instead of moving down the context menu the page scrolls down very quickly. How can I avoid this? I'm not sure how to wait for a context menu to appear, though I can wait for an element to be present. Here's the function: public static void rightClickCopyImageLink(WebElement image){ Actions copying = new Actions(driver); copying.contextClick(image).sendKeys(Keys.ARROW_DOWN).sendKeys(Keys.ARROW_DOWN). sendKeys(Keys

Not able to launch IE/Chrome from Selenium Webdriver

倖福魔咒の 提交于 2019-12-25 04:22:17
问题 While launching IE from Selenium Webdriver following error is shown: Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.ie.driver system property. at com.google.common.base.Preconditions.checkState(Preconditions.java:177) at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:105) at org.openqa.selenium.ie.InternetExplorerDriverService.access$1(InternetExplorerDriverService.java:1) at org

“org.openqa.selenium.NoSuchElementException: no such element” received when i click button in child window

孤者浪人 提交于 2019-12-25 03:19:21
问题 Error Message in console is as below. Getting below error when trying to click on the button in child window. org.openqa.selenium.NoSuchElementException: no such element (Session info: chrome=40.0.2214.111) (Driver info: chromedriver=2.9.248315, platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 30.05 seconds For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html Build

Message: stale element reference: element is not attached to the page document

て烟熏妆下的殇ゞ 提交于 2019-12-25 03:16:57
问题 Im trying to automate a task we do almost daily. I read that python in combination with selenium would be perfect to approach this task. Any advice is welcome :) See my code below. from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC usernameStr = 'USERNAME' passwordStr = 'PASSWORD' browser = webdriver.Chrome() browser.get('https://www.partner.co.il/he

Selecting item from dropdown using Selenium

你离开我真会死。 提交于 2019-12-25 02:28:29
问题 I need to use Selenium to select Cars/data-option-array-index="5" from the dropdown below: <!-- Activity --> <div class="field clearfix"> <label for="infosActivity" class="aligned">Main activity</label> <div class="contentinput"> <select id="infosActivity" name="shop_activity" class="chosen"> <option value="0" style="font-weight: bold" selected="selected">Please choose your main activity</option> <option value="2" >Animals and Pets</option> <option value="3" >Art and Culture</option> <option

How to select an option from a dropdown through Selenium WebDriver

天大地大妈咪最大 提交于 2019-12-25 01:45:57
问题 I have the following Inspected element Id for a dropdown with a few fields in a UI screen. DropDown values: List item1 List item2 List item3 Inspected Element ID: <select id="form1:PartialSysAdminKey_adminContractIdField" name="form1:PartialSysAdminKey_adminContractIdField" class="selectOneMenu" size="1"> There will be cases when the drop down will hold no values. I need to display a sysout log, only when this drop down has atleast one value. Can someone please suggest how can I incorporate

Is there a way to bypass Chrome geolocation dialog in Protractor tests?

十年热恋 提交于 2019-12-25 01:38:47
问题 I faced this problem, when automating an application with protractor. Once I open a home page I get geolocation dialog with Block/Allow buttons, which didn't let proceed without selection either option It turned out, that this dialog is not an instance of alert, that's why browser.switchTo().alert().confirm() didn't work Passing '--disable-notifications' argument to Chrome also didn't solve the problem Research online didn't give any positive results. How to solve it? 回答1: The solution to the

Logging in using Javascript and Selenium Webdriver (Chrome)

谁说胖子不能爱 提交于 2019-12-25 01:35:02
问题 I'm trying to write a script to access a Cisco Wireless LAN controller. I'm using Selenium and Chrome, and I'm stuck on the login page. From what I can tell, clicking the 'login' button on the Cisco splash screen triggers a javascript called loginAction() to prompt the user for a username and password. The problem I'm getting is that the popup login box has no identifiable elements. When the login box is displayed, the cursor is already active in the username field. It seems that I would be