This is documentation for the next version of Grafana k6 documentation. For the latest stable release, go to the latest version.
Frame
Frame represents a single frame in a browser window. It can be a top-level frame or an iframe. Frames are used to organize content in a browser window. Frames can be nested, and each frame has its own document and window objects.
| Method | Description | 
|---|---|
| $(selector) | Finds an element matching the specified selectorwithin the frame. | 
| $$(selector) | Finds all elements matching the specified selectorwithin the frame. | 
| check(selector[, options]) | Select the input checkbox. | 
| childFrames() | Returns an array of child frames. | 
| click(selector[, options]) | Clicks on an element matching a selector. | 
| content() | Gets the HTML contents of the frame. | 
| dblclick(selector[, options]) | Double click on an element matching the provided selector. | 
| dispatchEvent(selector, type, eventInit[, options]) | Dispatches HTML DOM event types e.g. 'click' | 
| evaluate(pageFunction[, arg]) | Returns the value of the pageFunctioninvocation. | 
| evaluateHandle(pageFunction[, arg]) | Returns the value of the pageFunctioninvocation as a
JSHandle. | 
| fill(selector, value[, options]) | Fill an input,textareaorcontenteditableelement with the provided value. | 
| focus(selector[, options]) | Fetches an element with selectorand focuses on it. | 
| frameElement() | Returns the frame’selement. | 
| getAttribute(selector, name[, options]) | Returns the element attribute value for the given attribute name. | 
| getByAltText(altText[, options]) | Returns a locator for elements with the specified altattribute text. | 
| getByLabel(text[, options]) | Returns a locator for form controls with the specified label text. | 
| getByPlaceholder(placeholder[, options]) | Returns a locator for input elements with the specified placeholderattribute text. | 
| getByRole(role[, options]) | Returns a locator for elements with the specified ARIA role. | 
| getByTestId(testId) | Returns a locator for elements with the specified data-testidattribute. | 
| getByText(text[, options]) | Returns a locator for elements containing the specified text. | 
| getByTitle(title[, options]) | Returns a locator for elements with the specified titleattribute. | 
| goto(url[, options]) | Navigates to the specified url. | 
| hover(selector[, options]) | Hovers over an element matching selector. | 
| innerHTML(selector[, options]) | Returns the element.innerHTML. | 
| innerText(selector[, options]) | Returns the element.innerText. | 
| inputValue(selector[, options]) | Returns input.valuefor the selectedinput,textareaorselectelement. | 
| isChecked(selector[, options]) | Checks to see if the checkboxinputtype is selected or not. | 
| isDetached() | Returns trueif the frame is detached from the DOM. | 
| isDisabled(selector[, options]) | Checks if the element is disabled. | 
| isEditable(selector[, options]) | Checks if the element is editable. | 
| isEnabled(selector[, options]) | Checks if the element is enabled. | 
| isHidden(selector[, options]) | Checks if the matched element is hidden. | 
| isVisible(selector[, options]) | Checks if the matched element is visible. | 
| locator(selector[, options]) | Returns a
Locator for the given selector. | 
| name() | Returns the name of the frame. | 
| page() | Returns the page containing the frame. | 
| parentFrame() | Returns the parent frame, if any. | 
| press(selector, key[, options]) | Focuses the element, and then presses the given keyon the
Keyboard. | 
| selectOption(selector, values[, options]) | Selects one or more options which match the values from a <select>element. | 
| setContent(html[, options]) | Sets the supplied HTML string to the current frame. | 
| setInputFiles(selector, file[, options]) | Sets the file input element’s value to the specified files. | 
| setChecked(selector, checked[, options]) | Sets the checkboxorradioinput element’s value to the specified checked or unchecked state. | 
| tap(selector[, options]) | Taps the first element that matches the selector. | 
| textContent(selector[, options]) | Returns the element.textContent. | 
| title() | Returns the title of the frame. | 
| type(selector, text[, options]) | Types the textin the first element found that matches theselector. | 
| uncheck(selector[, options]) | Unchecks an input checkboxelement. | 
| url() | Returns the frame’s URL. | 
| waitForFunction(pageFunction, arg[, options]) | Returns when the pageFunctionreturns a truthy value. | 
| waitForLoadState(state[, options]) | Waits for the given load stateto be reached. | 
| waitForNavigation([options]) | Waits for the given navigation lifecycle event to occur and returns the main resource response. | 
| waitForSelector(selector[, options]) | Returns when element specified by selector satisfies stateoption. | 
| waitForTimeout(timeout) | Waits for the given timeoutin milliseconds. | 
| waitForURL(url[, options]) | Waits for the frame to navigate to the specified URL. | 






