Skip to content

Commit 66733e5

Browse files
committed
fix(docs): wrong frame api
1 parent 21b38c5 commit 66733e5

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

website/docs/BasicInterfaces/FrameEnvironment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ const response = await mainFrame.fetch(postUrl, {
122122
});
123123
```
124124

125-
### frameEnvironment.getFrameEnvironment*(frameElement)* {#find-frame}
125+
### frameEnvironment.getFrameEnvironment*(frameElement)* {#get-frame-environment}
126126

127127
Get the [FrameEnvironment](/docs/basic-interfaces/frame-environment) object corresponding to the provided HTMLFrameElement or HTMLIFrameElement. Use this function to attach to the full environment of the given DOM element.
128128

@@ -137,7 +137,7 @@ await agent.goto('https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ifra
137137
const { document } = agent.activeTab;
138138
const iframeElement = document.querySelector('iframe.interactive');
139139

140-
const iframe = await agent.findFrame(iframeElement);
140+
const iframe = await agent.getFrameEnvironment(iframeElement);
141141

142142
const h4 = await iframe.document.querySelector('h4').textContent; // should be something like HTML demo: <iframe>
143143
```

website/docs/Overview/Configuration.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Configuration variables can be defined at a few levels:
88

99
The internal `@secret-agent/core` module can receive several configuration options on [start](#core-start), or when a [Handler](/docs/basic-interfaces/handler) or [Agent](/docs/basic-interfaces/agent) establishes a [connection](/docs/advanced/connection-to-core).
1010

11-
### Connection To Core <div class="specs"><i>Agent</i></div>
11+
### Connection To Core <div class="specs"><i>Agent</i></div>
1212

1313
The [ConnectionToCore](/docs/advanced/connection-to-core) to be used by a [Handler](/docs/basic-interfaces/handler) or [Agent](/docs/basic-interfaces/agent).
1414

@@ -97,17 +97,9 @@ Configures a proxy url to route traffic through for a given Agent. This function
9797

9898
An upstream proxy url should be a fully formatted url to the proxy. If your proxy is socks5, start it with `socks5://`, http `http://` or `https://` as needed. An upstream proxy url can optionally include the user authentication parameters in the url. It will be parsed out and used as the authentication.
9999

100-
### Browsers Emulator Ids <div class="specs"><i>Connection</i><i>Agent</i><i>Core</i></div>
100+
### Browsers Emulator Id <div class="specs"><i>Agent</i></div>
101101

102-
Configures which [BrowserEmulators](/docs/advanced/browser-emulators) to enable or use in a given Agent.
103-
104-
At an Agent level, `browserEmulatorId` configures the module to use.
105-
106-
- Configurable via [`Handler.createAgent()`](/docs/basic-interfaces/handler#create-agent) or [`Handler.dispatchAgent()`](/docs/basic-interfaces/handler#dispatch-agent).
107-
108-
At a Connection or Core level, `browserEmulatorIds` indicates a list of modules to initialize before any Agents are created.
109-
110-
- Configurable via [`Core.start()`](#core-start) or [`ConnectionToCore`](/docs/advanced/connection-to-core).
102+
Configures which [BrowserEmulator](/docs/advanced/browser-emulators) to use in a given Agent.
111103

112104
### Human Emulator Id <div class="specs"><i>Agent</i></div>
113105

@@ -127,8 +119,6 @@ Update existing settings.
127119
- maxConcurrentAgentsCount `number` defaults to `10`. Limit concurrent Agent sessions running at any given time.
128120
- localProxyPortStart `number` defaults to `any open port`. Starting internal port to use for the mitm proxy.
129121
- sessionsDir `string` defaults to `os.tmpdir()/.secret-agent`. Directory to store session files and mitm certificates.
130-
- defaultBlockedResourceTypes `string[]` defaults to `[None]`. Controls enabled browser resources.
131-
- defaultUserProfile `IUserProfile`. Define user cookies, session, and more.
132-
- replayServerPort `number`. Port to start a live replay server on. Defaults to "any open port".
122+
- coreServerPort `number`. Port to run the Core Websocket/Replay server on.
133123

134124
#### **Returns**: `Promise`

0 commit comments

Comments
 (0)