Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

device, android #13

Closed
octaltree opened this issue Apr 16, 2021 · 1 comment
Closed

device, android #13

octaltree opened this issue Apr 16, 2021 · 1 comment

Comments

@octaltree
Copy link
Owner

No description provided.

@octaltree
Copy link
Owner Author

With 0.0.15, Playwright::device is available for ContextBuilder::set_device and PersistentContextBuilder::set_device.

pub async fn all(playwright: &Playwright, port: u16, _which: Which) {
let _devices = playwright.devices();
let device = playwright.device("iPhone 11 Pro").unwrap();
dbg!(&device);
let chromium = playwright.chromium();
let browser = chromium.launcher().launch().await.unwrap();
let ctx = browser
.context_builder()
.set_device(&device)
.build()
.await
.unwrap();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant