3

I'm using TestCafe for test automation of a web application based on the Wicket framework. I try to type text into a text input field ... well, actually it is a dropdown list, where a text input field appears, so that the user can search for certain codes. The HTML fragment is as follows: HTML fragment

And here is the corresponding screenshot (text field above "001"): Text input field with dropdown

The user can type some characters and the list below is automatically filtered (I did this manually): Text input field with some text

My TestCafe test tries this:

.click( productcodeList )
.expect( productcodeInputField.visible ).ok()
.click( productcodeInputField )
.typeText( productcodeInputField, 'ABW' )

i.e. Click on the drop down list. Assume that the text input field is now visible (works fine). Click on the text input field (this should not be necessary, since typeText() is supposed to do this anyway). Type the text "ABW" into the text input field ==> This does not work. I'm sure that my Selector works, since the assertion (expect) is successful and when I debug the test run after the second click (on the text input field), I see the following: TestCafe screenshot I.e. the cursor is directly on the text field, but somehow TestCafe cannot write the text into the field.

Some additional information: The Selector for the input field is created as follows:

productcodeInputField = Selector('span').withAttribute('class', /select2-dropdown.*/ ).child('span').withAttribute('class', /select2-search.*/ ).child('input').withAttribute('class', 'select2-search__field' );

More information: I'm using the same logic on the same page:

kurzbezeichnungField = Selector('input').withAttribute('name', /.*aeAbbreviation.*/);
...
await t.click( kurzbezeichnungField )
       .typeText( kurzbezeichnungField, 'xxxWWW' )

and this works fine. Node.js version: v10.16.3 Testcafe version: 1.5.0

Alex Skorkin
  • 4,264
  • 3
  • 25
  • 47
  • I don't suppose that you could share the CSS selector (or XPath, whatever your choice was) that you're using to interact with this input field? Everything else looks fine so... really it's clutching at straws a bit but it might shed some light on this. – AJC24 Oct 11 '19 at 17:24
  • @AJC24: I'm using the same logic for an input field on the same page ... see additional info above. – thomasreuter.vf Oct 14 '19 at 06:17

1 Answers1

1

This issue looks like a bug. However, I cannot say it precisely without an example that demonstrates the problem.

My team would really appreciate it if you share your project or sample to demonstrate the issue.

Please create a separate issue in the TestCafe github repository using the following template and provide as much additional information as possible.

Alex Kamaev
  • 6,198
  • 1
  • 14
  • 29
  • Hi Alex, thanks for your answer. Unfortunately this is a company internal application, which I cannot share outside the company. I will nevertheless try to supply more information on this topic. – thomasreuter.vf Oct 10 '19 at 05:58
  • @thomasreuter.vf, Thank you for cooperation. We will be happy to fix this behavior if you help us to reproduce the issue. – Alex Kamaev Oct 14 '19 at 08:48