MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / isSelectable

Function isSelectable

javascript/atoms/typescript/get-attribute.ts:106–115  ·  view source on GitHub ↗
(element: Element)

Source from the content-addressed store, hash-verified

104 }
105
106 function isSelectable(element: Element): boolean {
107 if (isElement(element, 'OPTION')) {
108 return true;
109 }
110 if (isElement(element, 'INPUT')) {
111 const type = (element as HTMLInputElement).type.toLowerCase();
112 return type === 'checkbox' || type === 'radio';
113 }
114 return false;
115 }
116
117 function isSelected(element: Element): boolean {
118 if (isElement(element, 'OPTION')) {

Callers 1

getFunction · 0.70

Calls 1

isElementFunction · 0.70

Tested by

no test coverage detected