Skip to content

Commit

Permalink
Fix replaceWith expression for ChromeDPClient.newTab
Browse files Browse the repository at this point in the history
  • Loading branch information
joffrey-bion committed Oct 8, 2023
1 parent eff322b commit 424b351
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,13 @@ class ChromeDPClient(
*/
@Deprecated(
message = "Prefer richer API via web socket",
replaceWith = ReplaceWith("webSocket().attachToNewPage(url)"),
replaceWith = ReplaceWith(
expression = "webSocket().newPage().goto(url)",
imports = [
"org.hildan.chrome.devtools.sessions.newPage",
"org.hildan.chrome.devtools.sessions.goto",
],
),
)
suspend fun newTab(url: String = "about:blank"): ChromeDPTarget =
httpClient.put("$remoteDebugUrl/json/new?$url").body<ChromeDPTarget>().fixHost()
Expand Down

0 comments on commit 424b351

Please sign in to comment.