0

we are using testcafe tool for FE automation. On our page we have multiple vue components each having different text boxes( ex: contact info section, address info section).

All the text boxes have similar kind of selectors with only id as change. ex: id ='mobilenum' for phone num field. id='postalcode' for postal code field.

we are able to enter data into phone number but not on postal code. all the selectors are correct and we are able to enter data from console, but not from the code. we are getting below error

expected ' ' deeply equal to '1212gd'.

which means text is not getting entered into the textbox. We are able to enter data into first vue component of the page, the remaining textboxes which are related to other components are remained empty. When we disable 1st component of the page at code level, then we are able to enter data into 2nd component(which is newly became 1st component of the page). We are unable to understand why this issue is occurring. as it is code related to my project, i cant share the code.

i am trying to add some dummy code similar to actual

Selector for mobile num looks like below

document.querySelector('#Number').shadowRoot.querySelector('input')

and postalcode is

document.querySelector('#postal').shadowRoot.querySelector('input')

and at developement code level these are getting displayed on a page but belongs to different vue components Script:

await t.typeText(reg.phoneNumber, testdata.phoneNumber);
await t.expect(reg.phoneNumber.value).eql(testdata.phoneNumber)

await t.typeText(reg.postalCode, testdata.postalCode);
await t.expect(reg.postalCode.value).eql(testdata.postalCode);

Script is getting failed at postal code assertion, because it is unable to enter data

tauzN
  • 5,162
  • 2
  • 16
  • 21
Tester
  • 27
  • 1
  • 1
  • 5
  • 2
    You need to provide some code. – tauzN Apr 05 '21 at 09:30
  • I am really struggling with this! I am trying to give dummy code kindof thing. PF updated – Tester Apr 06 '21 at 08:22
  • It's hard to find the cause of the problem without test code and a project sample. Could you please [create a new issue](https://github.com/DevExpress/testcafe/issues/new?assignees=&labels=&template=bug-report.md) in the TestCafe GitHub repository and share a project sample where we can reproduce the problematic behavior? – aleks-pro Apr 07 '21 at 08:22

0 Answers0