codeceptjs / CodeceptJS

Supercharged End 2 End Testing Framework for NodeJS

Home Page:http://codecept.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I.fillField and I.see is not working when we do the cross browser testing

s-sugumar opened this issue · comments

fillField is not working while doing cross-broswer testing

solution or alternative method for this issue
I tried to type and append, but the same issue is coming

waitForElement is working fine, but fillField is not working

output:

[1] Error (Non-Terminated) | Error: Field "//mat-label[text()="New password"]/../../preceding-sibling::input" was not found by text|CSS|XPath | (err) => { step.status = 'failed'; step.endTime = ...

Provide test source code if related

Details

  • CodeceptJS version: ^3.5.15
  • NodeJS Version: 18.19.1
  • Operating System: Windows 10 10.0.19045
  • playwright: ^1.41.1
  • Configuration file:

exports.config = {
output: './output',
helpers: {
Playwright: {
url: 'https://telescope-dev.sourcef.us/login',
show: true,
browser: 'chromium',
timeout: 30000,
waitForAction: 2000,
chromium: {
args: [ "--use-fake-ui-for-media-stream", "--allow-file-access-from-files", "--use-fake-device-for-media-stream","--auto-select-desktop-capture-source" ]
},
// video: true,
trace: true,
// windowSize: '1920x1080'
},
"AssertWrapper" : {
"require": "codeceptjs-assert"
},
"ChaiWrapper" : {
"require": "codeceptjs-chai"
},
"HarHelper": {
require: './HarHelper.js'
}
},
include: {
I: './steps_file.js'
},
mocha: {},
bootstrap: null,
timeout: null,
teardown: null,
hooks: [],
gherkin: {
features: './features//.feature',
steps: [
'./step_definitions/login_steps.js',
'./step_definitions/survey_steps.js',
],
},
plugins: {
screenshotOnFail: {
enabled: true,
uniqueScreenshotNames:true
},
tryTo: {
enabled: true,
},
retryFailedStep: {
enabled: true,
},
retryTo: {
enabled: true,
},
eachElement: {
enabled: true,
},
pauseOnFail: {},
stepByStepReport: {
enabled: true,
screenshotsForAllureReport: true,
},
allure: {
enabled: true,
},
allure: {
enabled: true,
require: '@codeceptjs/allure-legacy',
},
},
stepTimeout: 0,
stepTimeoutOverride: [
{
pattern: 'wait.',
timeout: 0,
},
{
pattern: 'amOnPage',
timeout: 0,
},
],
tests: 'tests/
_test.js',
name: 'TelescopeCodeceptjsFramework',
multiple: {
parallel: {
nonCallingTag: '@nonCalling',
callingTag: '@calling',
}
}
};

Sorry, not enough information on this case.

I think the element is not input/textarea/contenteditable

I recommend using click it and type instead of fillField

That was a input field, check the tagname