New answers tagged

3

If you are not sure about the locator then you can use the action class sendKeys method to interact with the field. Here, it interacts with the active (currently focused ) element. So the first step is to bring the element to focus, this can be done by just clicking it: await browser.get('https://stackblitz.com/edit/ngx-monaco-editor-example') await ...


1

In CucumberJS you can use a setWorldConstructor where you can create for example a this.context which can we used in each steps and hooks I think. For an example code look here: https://github.com/cucumber/cucumber-js/blob/0b2d7e468cf10ecef37749efaddd2dfbea8c7808/features/generator_step_definitions.feature Other reads: Use arrow notation to use world this ...


3

You are trying to access element instance that was created using the previous browser instance. The workflow is as follow, You imported the page object instance at the start of the spec using require A browser instant is created in the onPrepare Using that instance your page object model gets the element object But on next 'It' the browser restarts but the ...


0

To resolved this issue ensuring that all PageObjects, were properly re-initialized before each test. It ensures that the ElementFinder properties are using the current browser session. Below is code snippet to initialise a page object before each test. beforeEach(() => { //Ensure that we initialize the page object before every test as we ...


0

TSF exposes HTTP endpoints from which you can fetch data. You can find examples here and here.


1

Hi if your params variable is token , then in onprepare call it as browser.token , instead of browser.parans.token Another way is to declare a global variable in config file and use it . In JavaScript it's straight forward as putting global token , in the top of conf.js and using it as token anywhere else You can also try out steps listed out in below ...


Top 50 recent answers are included