Skip to content

Commit ca3ba6a

Browse files
author
rocketraccoon
committed
feat(testplane): fixes
1 parent fc1ed2b commit ca3ba6a

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed

docs/commands/browser/restoreState.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import Admonition from "@theme/Admonition";
2+
13
# restoreState
24

35
## Overview {#overview}
@@ -14,6 +16,11 @@ You can optionally specify which storage types to restore using the `cookies`, `
1416

1517
The state data for restoration can be obtained from the [saveState](../saveState) command.
1618

19+
<Admonition type="warning">
20+
You must be on the exact same page from which the cookies were originally saved. You need to
21+
navigate to the page first, use the [url](../url) command before restoring state.
22+
</Admonition>
23+
1724
```typescript
1825
await browser.restoreState({
1926
path: "./stateDump.json",

i18n/ru/docusaurus-plugin-content-docs/current/commands/browser/restoreState.mdx

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,21 @@
1414

1515
Данные для восстановления состояния можно получить с помощью команды [saveState](../saveState).
1616

17+
<Admonition type="warning">
18+
Вы должны находиться на той же странице, с которой были сохранены cookies. Вам нужно сначала
19+
перейти на страницу, используйте команду [url](../url) перед восстановлением состояния.
20+
</Admonition>
21+
22+
```typescript
23+
await browser.restoreState({
24+
path: "./stateDump.json",
25+
data: stateDump,
26+
cookies: true,
27+
localStorage: true,
28+
sessionStorage: true,
29+
});
30+
```
31+
1732
## Параметры команды {#parameters}
1833

1934
<table>
@@ -65,16 +80,6 @@
6580
</tbody>
6681
</table>
6782

68-
```typescript
69-
await browser.restoreState({
70-
path: "./stateDump.json",
71-
data: stateDump,
72-
cookies: true,
73-
localStorage: true,
74-
sessionStorage: true,
75-
});
76-
```
77-
7883
## Примеры использования {#examples}
7984

8085
Восстановление данных из файла.

0 commit comments

Comments
 (0)