I a promise in such fashion,   function getMode(){     var deferred = Promise.defer();      checkIf('A')     .then(function(bool){         if(bool){             deferred.resolve('A');         }else{             return checkIf('B...
I'm using Selenium2 for some automated tests of my website, and I'd like to be able to get the return value of some Javascript code.  If I have a foobar() Javascript function in my webpage and I want to call that and get the return value in...
I am using WebDriver with Java for test automation. I have the following HTML code for input field which is hidden:  <input type="hidden" value="" name="body" id=":6b">   How to type something in hidden field in...
The Problem:  In our rather big test codebase, we are using different keyboard shortcuts. For instance, to copy selected text we are using CTRL/COMMAND + C, to paste CTRL/COMMAND + v, to open a new tab CTRL/COMMAND + T etc.  To keep tests work on mul...
Because Webdriver waits for the entire page to load before going on to the next line, I think disabling images, css and javascript will speed things up.  from selenium import webdriver from selenium.webdriver.firefox.firefox_profile import FirefoxPro...
q library has this neat feature to resolve and spread multiple promises into separate arguments:     If you have a promise for an array, you can use spread as a   replacement for then. The spread function “spreads” the values over   the arguments...
I'm new on protractor, and I'm trying to implement an e2e test. I don't know if this is the right way to do this, but... The page that I want to test is not a full angular page based, so... I'm having some trouble.  On my first spec I...
Checking the protractor documentation, I see there is a option to run protractor without using Selenium server using directConnect: true flag.  What is the difference between running protractor tests with a selenium server and without a selenium serv...
I'm try to get the currently selected text in an input using window.getSelection() but I'm always getting an empty string:  expect(browser.executeScript("return window.getSelection().toString();")).toEqual("test");   Results i...
I have an element which is visible only when I hover over it.  I've written following code to hove over the panel so that the element is visible.  ptor.actions().             mouseMove(ptor.findElement(protractor.By.xpath('//*[@id="produc...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.