HTML 5 Elements

JDI Testing platform

Powerful Framework for UI Tests Automation. Suitable for any UI project: Web(Html5, Angular, React...), Mobile(Android IOs), Desktop(Win app) etc.

Description

Button




Tag button













Button

W3C: https://www.w3schools.com/tags/tag_button.asp

MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button

click() - Click on link

getText() - Get link's text

getRef() - Get link's "ref" attribute

getUrl() - Get link's "ref" attribute as URL

getAlt() - Get link's "alt" attribute

Link

W3C: https://www.w3schools.com/tags/tag_a.asp

MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a

click() - Click on link

getText() - Get link's text

ref() - Get link's "ref" attribute

url() - Get link's "ref" attribute as URL

alt() - Get link's "alt" attribute

Textfield

Input with type "text

W3C: https://www.w3schools.com/html/html_form_input_types.asp

MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/text

sendKeys(value) - Input text in textfield in addition to tet that already at textfield. You also can use Keyboard keys as value

clear() - Clear text in textfield

input(value) - Set textfield with value text. Clear previously entered text

setText(value) - Set text in textfield immediately. Much faster than regular input or sendKeys. Save input time significantly for long text values

focus() - Just focus cursor to textfield

placeholder() - Returns textfiled's placeholder value

label() - Returns label element associated with textfield

getText() - Get textfield's text


Textarea

Multi-line text input

W3C: https://www.w3schools.com/tags/tag_textarea.asp

MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea

clear() - Clear text in textarea

input(value) - Set textarea with value text. Clear previously entered text

inputLines(value) - Clear textarea and Input several lines of text in textarea

addNewLine(value) - Add text in textarea from new line (without clearing previous)

getLines() - Get lines of text in textarea

label() - Returns label element assosiated with textarea

focus() - Just focus cursor to textfield

Download JDI Logo

Input FileUpload

Let the user choose one or more files from their device storage

W3C: https://www.w3schools.com/jsref/dom_obj_fileupload.asp

MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input/file

setValueAction(value) - Clear and input value

focus() - Just focus cursor to uploader

clear() - Clear value in uploader

label() - Returns label element assosiated with uploader

Image

Image in an HTML page

W3C: https://www.w3schools.com/tags/tag_img.asp

MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img

getAlt() - Get image's "alt" attribute

getSource() - Get image source

click() - Click on the element

Selector

Drop-down list

W3C: https://www.w3schools.com/tags/tag_select.asp

MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select

select(value) - Select Element with name from list

getSelected() - Get name of the selected Element

getSelectedIndex() - Get index of the selected Element

isSelectedAction(value) - Verifies selected text with value

isHidden() - Check is Element hidden

waitDisplayed() - Waits while Element becomes visible

Multiple selector

List with multiple options can be selected at once

W3C: https://www.w3schools.com/tags/att_select_multiple.asp

MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select

clearAction() - Clear options

select(values) - Select multiple values

uncheck(values) - Uncheck only specified options

areSelected() - Get names of checked options

isHidden() - Check is Element hidden

waitSelected(values) - Wait while all options with values selected

areDeselected() - Get names of unchecked options

Multi dropdown

List with multiple dropdown options

W3C: https://www.w3schools.com/tags/att_select_multiple.asp

MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select

expand() - Expand DropDown

close() - Close DropDown

getTextAction() - Get first selected option

select(values) - Select options with values from list

clear() - Deselect all options

Datalist

List of pre-defined options for input

W3C: https://www.w3schools.com/tags/tag_datalist.asp

MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist

expand() - Expand DropDown

getValue() - Get value of Element

clearAction() - Clear value

input(value) - Input text in textfield


Checkbox

W3C: https://www.w3schools.com/tags/att_input_type_checkbox.asp

MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox

click() - Click on checkbox

check() - Set checkbox checked

uncheck() - Set checkbox unchecked

isChecked() - Verify is checkbox checked

getValue() - Get value of Element





Checklist

W3C: https://www.w3schools.com/tags/att_input_type_checkbox.asp

MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox

check(String... values) - Check only specified values. All other values make unchecked

check(TEnum... values) - Same as above for values in Enum

check(int... values) - Same as above but for indexes

uncheck(int... indexes) - Uncheck only specified values. All other values make unchecked

uncheck(TEnum... values) - Same as above for values in Enum

uncheck(int... values) - Same as above but for indexes

List checked() - List of checked values




Radio

W3C: https://www.w3schools.com/tags/att_input_type_radio.asp

MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input/radio

select(value) - Select Element with value from list

getSelected() - Get name of the selected Element

isSelectedAction(value) - Verify checked value


Disabled

Input type color

Defines a color picker

W3C: https://www.w3schools.com/tags/att_input_type_color.asp

MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color

click() - Click on input

setValue(value) - Set value to Element

getValue - Get value of Element

ok() - Click on ok button


10 100




Progress

Represents the progress of a task

W3C: https://www.w3schools.com/tags/tag_progress.asp

MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress

getValue() - Get value of Element

Input type date

W3C: https://www.w3schools.com/tags/att_input_type_date.asp

MDN: https://developer.mozilla.org/ru/docs/Web/HTML/Element/Input/date

setValue(value) - Set value to Element

getValue() - Get value from Element

Input type month

W3C: https://www.w3schools.com/tags/att_input_type_month.asp

MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/month

setValue(value) - Set value to Element

getValue() - Get value from Element

Input type datetime-local

W3C: https://www.w3schools.com/tags/att_input_type_datetime-local.asp

MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input/datetime-local

setValue(value) - Set value to Element

getValue() - Get value from Element

Input type time

W3C: https://www.w3schools.com/tags/att_input_type_time.asp

MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time

setValue(value) - Set value to Element

getValue() - Get value from Element

Input type week

W3C: https://www.w3schools.com/tags/att_input_type_week.asp

MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/week

setValue(value) - Set value to Element

getValue() - Get value from Element

Input type number

W3C: https://www.w3schools.com/tags/att_input_type_number.asp

MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number

setValue(value) - Set value to Element

getValue() - Get value from Element

Shadow element:

Element with pseudo:

Invisible elements:

Invisible Button CSS display-none
Invisible Button CSS visibility-hidden
Invisible Button CSS visibility-collapse
Invisible Button HTML hidden
Invisible Button HTML hidden parent