Skip to content

Commit

Permalink
docs(api): fix web view api code examples.
Browse files Browse the repository at this point in the history
Those actions works on web elements, and not on web-view element.
  • Loading branch information
asafkorem committed Dec 11, 2022
1 parent a713096 commit 536aa87
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions docs/api/webviews.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,17 +267,15 @@ await webElement.runScriptWithArgs(`function foo(arg1, arg2, element) {
Get the current URL of the web view.

```js
const webview = web(by.id('webview'));
const url = await webview.getCurrentUrl();
const url = await web.element(by.web.id('identifier')).getCurrentUrl();
```

### `getTitle()`

Get the title of the web view.

```js
const webview = web(by.id('webview'));
const title = await webview.getTitle();
const title = await web.element(by.web.id('identifier')).getTitle();
```

## Expectations
Expand Down

0 comments on commit 536aa87

Please sign in to comment.