Taiko: Support for html 5 input types

Created on 12 Jun 2019  路  17Comments  路  Source: getgauge/taiko

Support the following input types.

  • [x] color
  • [x] date
  • [x] datetime-local
  • [x] image
  • [x] month
  • [x] range
  • [x] time
  • [x] week
help wanted good first issue

All 17 comments

I'm working on this issue.

Judging by MDN Dev Docs, I think "input type image" should be detected as a button instead of a textBox, any thoughts?

"input type image" should be detected as a button instead of a textBox

Yes that's right.

I implemented input image and extended the existing tests and all tests pass.

I'm having trouble with the other input types, just extending the tests fail for all new input types (always return empty). I think there's some conflict between the current tests and the html5 inputs since I'm using the same changes in a modded Taiko.js file in a personal project and I have tests working on input time using textBox.

I'll try writing a set of new tests specifically for the new input types this weekend just to see if I can figure out the problem.

@wkoch I suggest you raise PRs for the ones you have finished, you can always raise more than one PR for this issue. This will help keep the code upto date and also avoid long PRs.

Support for image available in commit f3b7aafcede6f0185c06ac23f85451f497b4951a.

verified support for html5 input type image. Taiko able to perform click operation
for input type image webelement.
Tested version: afd215c9be7633fde970f2e464b3d144517bf638

All the ones left for implementation falls under TextBox... right?

All the ones left for implementation falls under TextBox... right?

Yes.

@wkoch If I may know, are you still working on this issue? If not, I might consider this great opportunity to try to implement the rest of them. Thanks.

@wkoch If I may know, are you still working on this issue? If not, I might consider this great opportunity to try to implement the rest of them. Thanks.

Please, do. I'm also needing this functionality.

@Apoorva-GA @zabil , considering 'Range' input type, we do want to expose user with 'min', 'max' and setting the value of the range input.. right?

As they are attributes we can use the format { min: 0, max:10 } as an option. Can you share an example of what you had in mind?

@zabil @o-x-y-g-e-n Sorry for the late response here, but I think the input types color and range are not really textBox input types. In Taiko, we consider any field where some form of text can be typed in as a textBox.
The color input type opens up a color box popup.
The range input type appers as a slider, so it doesn't really appear like a text input field and hence it wouldn't be right to use the textBox api to select range input.
I suggest, we have separate APIs for color and range.

@zabil @o-x-y-g-e-n Sorry for the late response here, but I think the input types color and range are not really textBox input types. In Taiko, we consider any field where some form of text can be typed in as a textBox.
The color input type opens up a color box popup.
The range input type appers as a slider, so it doesn't really appear like a text input field and hence it wouldn't be right to use the textBox api to select range input.
I suggest, we have separate APIs for color and range.

I totally agree with you. That's the reason i asked the question for range. But at the time of implementation for each of them, I think we can group them all together under textbox because they all atlast work the same way. I mean agreeing the fact that color opens a popup to choose a color & range appears a slider, but at last the end user would want to just set the value and get' em.

The way i see it, assume that your browser doesn't suppose range or color. How would that appear? Also would the implementation also differ for both of them? or just that they should be just different API's?

Just my thought. Let me know what everyone thinks and that should be the way to go... :)

The way i see it, assume that your browser doesn't suppose range or color.

We can assume that Taiko works only browsers that support range and color input types.

just that they should be just different API's?

Yes, for ease of use. It may not be easy to find textbox as the api for working with ranges and color. Keep support for them in textbox, but at the same time introduce separate API's for range and color for convienience. Internal range and color could just use the textbox API.

Sure @zabil 馃憤

Was this page helpful?
0 / 5 - 0 ratings