5 votes
Accepted

Switching from JavaScript to TypeScript for Protractor e2e tests

The nice thing of TypeScript you do not have to migrate at once. TypeScript is a superset and can parse plain JavaScript as well. You can keep your old code and start using TypeScript for new code or ...
Niels van Reijmersdal's user avatar
4 votes
Accepted

Assert that options (text) in drop down are unique

Get the text and add to a array Convert array to set and compare the size Set will have only unique elements (Removes the duplicates) So if length of set and array are different , it means there where ...
PDHide's user avatar
  • 11.1k
4 votes
Accepted

Correct Strategy for Element to be not present in DOM

After a long hard fought battle, I was able to overcome this using opposite of what K-8 had suggested. Instead of checking if an element is visible on the viewport, I checked the negative of that, ...
demouser123's user avatar
  • 3,532
4 votes

Switching from JavaScript to TypeScript for Protractor e2e tests

NO. I would not suggest doing so until you have a specific objective to be met by doing it. In my opinion, its only worth the effort if you are working on large development project but for ...
Vishal Aggarwal's user avatar
2 votes

How to tell protractor to wait for each command for 3 seconds

I think you can use the implicitlyWait option, although it has been removed from the Protractor documentation: onPrepare: function(){ browser.manage().timeouts().implicitlyWait(3000); }, Code ...
Niels van Reijmersdal's user avatar
2 votes

How to generate Excel test report from Appium with mocha chai?

By default, as per the Mocha documentation on reporters, there is no Excel reporter. There are some CLI reporters (Spec, Dot, etc) and there are HTML and JSON reporters. A quick Google search shows ...
Lee Jensen's user avatar
  • 2,196
2 votes

How many it() should I use in my test files?

Remember the goal of automated check: To provide quickly feedback on the behavior of the software, so the developers can iterate over it to make it better. Think about the risks you are trying to ...
João Farias's user avatar
  • 10.9k
2 votes

Typescript function not waiting for the waitForExist() and printing the next line

WaitForExit() checks only for the presence of and not the visibility. You could use $(selector).waitForDisplayed instead. And also ensure there is no other element with the same selector.
PDHide's user avatar
  • 11.1k
1 vote

Is there a way to write protractor tests to test on devices plugged into my pc not via browserstack

You should try using Appium. Java + Appium definitely works. Plug in your mobile device, start the Appium server, and run your tests. I am not sure if Protractor supports running native apps on ...
ToastMan's user avatar
  • 390
1 vote

How to pass automation test case data from TFS to Protractor using Cucumber/Jasmine

TSF exposes HTTP endpoints from which you can fetch data. You can find examples here and here.
João Farias's user avatar
  • 10.9k
1 vote

How to tell protractor to wait for each command for 3 seconds

No, You should NOT use static waits, it is a bad practice. Instead...Read below Disclaimer : I am an actual Protractor SDET, who has been using Protractor from last couple of years in actual Large ...
Vishal Aggarwal's user avatar
1 vote

How do I store a value in a global variable and then use it in subsequent steps of a scenario in protractor cucumber typescript based project

Go to your conf.js file and create an onPrepare function, there you can define and initialize a global variable. Below is a sample: exports.config = { directConnect: true, ...
Pankaj Dubey's user avatar
1 vote

webdriverIO typescript execute function doesn't recognise JS execution code

I suggest use pipeable operators : example In TypeScript 2.3 and lower, typings will need to be added to functions passed to operators, as types cannot be inferred prior to TypeScript 2.4. In ...
Rao's user avatar
  • 276
1 vote

How to enter acceptable fake data to login page which is tests using protractor?

Config file has a params option: Based on https://github.com/angular/protractor/blob/5.4.1/lib/config.ts: "The params object will be passed directly to the Protractor instance, and can be accessed ...
return's user avatar
  • 445
1 vote

ElementArrayFinder.filter() - how does it work under the hood?

First of all, I don't think that your usage of getting text is correct.We need to get the text individually from each element, something like this: element.all(by.css('something')).map(function(elm) {...
Vishal Aggarwal's user avatar
1 vote

How to wait till next page opens after a button click in Jest + TypeScript?

I could found a solution. login_page.ts driver: ThenableWebDriver; findWelcomeMessageField(){ return this.driver.wait(until.elementLocated(By.id('welcome')), 2000); } public async ...
Dona's user avatar
  • 21
1 vote

Scrolling to Bottom of the Text Area using Protractor

Have you tried simply scrolling to the bottom without any reference to any object: element(by.className('<any element on page>')).click();//to focus on page first where scroll need to happen ...
Vishal Aggarwal's user avatar

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