cucumberjs

Get index of the specific td in tr by XPath

若如初见. 提交于 2019-12-14 04:00:03
问题 I have thead and tbody in the table. Thead contains a few s in . Each of it have an id. I need to find the index of td in thead by id and then find by index in tbody. <table> <thead> <tr> <td data-date="2019-08-05"></td> <td data-date="2019-08-06"></td> //find index of this element <td data-date="2019-08-07"></td> </tr> </thead> <tbody> <tr> <td>aaa</td> <td>bbb</td> //find this element by found index <td>ccc</td> </tr> </tbody> </table> upd <table> <thead> <tr> <td data-date="2019-08-05"><

BUG: launcher exited with 1 task remaining protractor cucumber

感情迁移 提交于 2019-12-13 03:56:36
问题 I reopened my question related on answer issue. So I setup the protractor and cucumber framework. I tried to launch the tests but I get the error message: E/launcher - BUG: launcher exited with 1 tasks remaining protractor protractor.conf.js output C:\obw\IVO_Workspace\mui-cpin-lb-spa\i\Cucumber>protractor protractor.conf.js (node:11656) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmp dir() instead. [11:33:00] I/hosted - Using the selenium server at http://127.0.0.1:4444

Protractor Cucumber Configuration file throwing undefined warning for my scenarios even though those are present

99封情书 提交于 2019-12-13 02:57:57
问题 my Configuration file is not able to find the spec file even though it is present in the path that i provided in the cucumberOpts..i tried all the resolutions but none of them is worked. Config File const log4js = require('log4js'); var fs=require('fs'); global.screenshots = require('protractor-take-screenshots-on-demand'); global.browser2; var propertiesReader=require('properties-reader'); var env=require("../../env.js"); const {Given, Then, When, Before} = require('cucumber'); exports

how to pass command line arguments with protractor conf

不羁岁月 提交于 2019-12-13 02:19:38
问题 We have protractor-cucumber framework as e2e test. Till now we use the conf file with statically mentioning the environment details inside the conf json. I would like to pass user defined arguments with the protractor_conf file something like below. protractor protractor_conf.js -DbrowserName=chrome -DexecPlatform=(native/sauce) and would like to fetch this argument inside the conf.js and substitute under the capabilities section. I could not get proper details on net, so any help/suggestions

Path mapping with typescript doesn't work with cucumber test runner

帅比萌擦擦* 提交于 2019-12-12 19:17:41
问题 When running cucumber-js with my typescript project, path remapping fails. Using relative paths is fine but unforgivably ugly. E.g. import ... from "@src/..." fails, while import ... from "../../../foo.ts" works fine. My project looks something like this: package.json tsconfig.json src/ **/*.ts Inside tsconfig.json , I specify remap paths: "paths": { "@src/*": [ "src/*" ], "*": [ "node_modules/*", "src/types/*" ] My commandline looks like this: cucumber-js 'src/**/*.feature' --require-module

How to run only one feature file when running protractor with cucumber?

本小妞迷上赌 提交于 2019-12-12 12:16:30
问题 I have multiple feature files and I would really love to run just one file or just one scenario or just one tag. I know I could just provide one file in my specs in my cucumberConf.js, but I would like to run it once without fiddling with my cucumberConf.js. Which arguments do I need to type in when running protractor? 回答1: The easiest way to do this would be to use the --specs option. protractor --specs=specs/testA.js e2e-conf.js 回答2: in protractor's config: cucumberOpts: { ... tags: [ "

Generate HTML report for WebdriverIO/Cucumber framework

狂风中的少年 提交于 2019-12-12 08:56:11
问题 I am using WebdriverIO/Cucumber ( wdio-cucumber-framework ) for my test automation. I want to get the test execution result in a HTML file. As of now I am using Spec Reporter ( wdio-spec-reporter ). Which helps to print the results in console window. But I want all the execution reports in a HTML file. How can I get WebdriverIO test execution result in a HTML file? Thanks. 回答1: OK, finally got some spare time to tackle your question @Thangakumar D. WebdriverIO reporting is a vast subject (

Usage: java cucumber.api.cli.Main [options] [ [FILE|DIR][:LINE[:LINE]*] ]+

本小妞迷上赌 提交于 2019-12-12 04:34:29
问题 I am getting this error while running my feature file Usage: java cucumber [options] [ [FILE|DIR][:LINE[:LINE]*] ]+ Options: -g, --glue PATH Where glue code (step definitions and hooks) is loaded from. -f, --format FORMAT[:PATH_OR_URL] How to format results. Goes to STDOUT unless PATH_OR_URL is specified. Built-in FORMAT types: junit, html, pretty, progress, json. FORMAT can also be a fully qualified class name. -t, --tags TAG_EXPRESSION Only run scenarios tagged with tags matching TAG

JSON report not generating for failed scenarios using protractor

我怕爱的太早我们不能终老 提交于 2019-12-12 04:12:03
问题 If my scenarios got failed the JSON report not generating. But for passes scenarios I can able to see the JSON report. Please find my config file as below. In comment prompt console I can able to see the failure message: W/launcher - Ignoring uncaught error AssertionError: expected false to equal true E/launcher - BUG: launcher exited with 1 tasks remaining 回答1: You can save the report by using a hook, so don't generate the file form the protractor.conf.js file, but use a cucumber-hook for it

Not able to fetch correct data while executing 2 queries in BeforeAll function in protractor

筅森魡賤 提交于 2019-12-11 17:53:16
问题 I am using protractor 5.2.2. and cucumber 3.2.0.I am executing 2 queries in Before All function for fetching the data from the DB.But i need to execute in a way that after executing first query completely, then only i need to start executing the second query(because i am using the 1st query result in 2nd query and i need to catch the 2nd query result before starting all scenarios.).The code i have given in the BeforeAll function is given below var Connection = require('tedious').Connection;