Hot answers tagged

4

WebDriver cannot be used todo browser specific actions, it can only be used to drive the web-page. Although sending the keys CTRL-TAB might switch tabs WebDriver will still think you are in the previous window. Switching Tabs as you want is thus actually something different. Each tab is actually a window organised in a tab like look-and-feel. Thus you ...


2

We now have an API for this. See scroll into view


2

"chromedriver": "^2.36.0", "selenium-webdriver": "^4.0.0-alpha.1", here example of create driver function: import webdriver from 'selenium-webdriver' import chrome from 'selenium-webdriver/chrome' import chromedriver from 'chromedriver' const TIMEOUT = 300000000 export default async () => { chrome.setDefaultService( new chrome.ServiceBuilder( ...


2

Remark: Applet is a bad idea since they are considered outdated technology by a lot of people and are not supported by some modern browsers. Search around about the issue, but here is the sample discussion. Fist of all I would think of the particular use-cases we need to support. Either there would be a button to run the entire test suite or it would be a ...


2

I had a same issue. It is due to a version issue. You can use: driver.manage().setTimeouts() or driver.sleep() please, check the documentation for more details.


2

var Page = require ('../lib/home_page.js'); var webdriver = require('selenium-webdriver'); { describe , before , after , it } require('selenium-webdriver/testing'); var page; describe('library app scenarious', function() { beforeEach(function(){ page = new Page(); page.CheckOut(); }); afterEach(function(){ ...


2

Jenkins "build now" can run any (Jenkins) test on demand. Because that URL is fixed (per project), you can create a HTML page with those URLs. If you use wiki, it would be trivial to create such portal to start tests. "Build now" is just plain URL, like http://jenkins.YOURSITE.com/job/PROJECT/build?delay=0sec but it is required to be POST method (not a ...


1

In your LoginTest.js , you have given incorrect reference of page object. change it to: var logins = require('../../pageObjects/login.po.js'); and then you do not need to create a page object, instead you should directly use the object that you have created earlier like below logins.typeUserName('test'); update your conf.js file, a sample is below: ...


1

You'd do it pretty much the same way you'd load test other interfaces for servers. You need a client that interacts with the server and a way to generate a lot of actions concurrently and for some period of time or repetitions. You could probably roll this solution yourself if you really wanted to or you could try an existing tool like Artillery. They ...


1

Implement exception handling. The solution in these scenarios which worked for me is, checking for console errors on each form submissions( post requests) and raising the JavaScript error which needs to caught on global framework level so that solution is not scattered all over the framework and raised from individual 'it' blocks and caught on global ...


1

Since what I want to test is not really the connection but how the client responds to undelivered acknowledgements, a possible way to approach this would be, once the broker publishes the message to the client(.120) and the full set of acknowledgement transaction happens, then publishes the same exact message with the addition of the dup flag to 1. The ...


1

IMHO, firstly, you should create JSON schema to test all your JSON files in an actual state with this JSON schema. This is very important to keep the structure of JSON in the correct way. Secondly, you need to create html file with all possible dom element variations to cover all cases. Then create JSON file with selectors. And then start the local web ...


1

Looking at your error after running "appium-doctor" I will say please remove white spaces from all path which you are using. [Mandatory] I referred earlier this link to have correct installation for JavaScript. and all the things started working for me! All the best!


1

It would be recommended to use await instead of having sleeps: var _wait_and_input = async function(element_type, descriptor, keys, message) { let element = element_type(descriptor); driver.wait(until.elementLocated(element)).then(() => { driver.wait(until.elementIsVisible(driver.findElement(element)), 20000).then((el) =&...


1

Where to use async-await in Protractor scripts? Async/await statements are only required in places where promise resolution is occurring before moving to the next statement so yes, it is only required for asynchronous promise returning statements. Why use async-await in Protractor scripts? WebDriverJS (and thus, Protractor) APIs are entirely asynchronous. ...


1

here is my code that i used to drag elements from one area to another, the only thing that you would need to do is figure out what you would define as 'elementDestination' which can be an area of another element or co-ordinates for the page. driver.actions().mouseDown(elementID).perform(); driver.actions(elementID).mouseMove(elementDestination).perform()...


1

I found the answer Turns out in options.. you're supposed to point to firefox.exe itself, not just the path const firefox = require('selenium-webdriver/firefox'); let options = new firefox.Options().setBinary(os.homedir() + '/AppData/Local/Mozilla Firefox/firefox.exe'); let driver = new webDr.Builder() .forBrowser('firefox').setFirefoxOptions(...


1

You almost had it. The first match is [1] not [0]. Change your line to: element = await driver.findElement(By.xpath("//select[@id='SelectEU'][1]")); Edit: Regarding your second question in your main post comments I do not have the nodejs knowledge to provide you the exact syntax of scrolling an element into view, however this is the JavaScript routine ...


1

You should be able to do this reasonably easily if you define your jenkins jobs using groovy pipeline syntax and install the blue ocean modules into jenkins , its a much slicker interface than previous jenkins pages. https://jenkins.io/projects/blueocean/ You can run each stage of the pipeline on its own and it will use the last built resources. https://...


1

I was having the same problem and this fixed it: const capabilities = await driver.getCapabilities(); capabilities['map_'].set('timeouts', { implicit: TIMEOUT, pageLoad: TIMEOUT, script: TIMEOUT }); getCapabilities() retrieves the Map of the driver's capabilities which you can then interact with using the default methods outlined in the MDN Javascript ...


1

Manually testing the application developed using two different technologies don't have any key differences. In manual testing, you are going to concentrate on the functionality flow, UI based on user stories.


1

You need to use Try-catch block to do it: try { driver.findelement(by.id("")).click(); fail(); } catch (Exception e) { // expected } // continue


Only top voted, non community-wiki answers of a minimum length are eligible