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

1.39 #51

Open
wants to merge 97 commits into
base: master
Choose a base branch
from
Open

1.39 #51

wants to merge 97 commits into from

Conversation

SamuelMarks
Copy link

Based on #49 then upgraded to latest (1.39) release. @octaltree

PS: @tmahmood happy to merge this into your PR if you want

Tarin Mahmood and others added 25 commits September 19, 2022 19:05
… the deserializer. Adding serde default to the `params` field resolves that
1. Load
2. DOMContentLoaded
3. Request
4. Response
# Conflicts:
#	scripts/Makefile
#	scripts/src/api.rs
#	scripts/src/generate_api.rs
#	src/imp/playwright.rs
#	src/protocol/generated.rs
ConsoleMessage structure was changed, which caused playwright to fail if there was any console messages.
Updated files required to update protocol
Fixed issue with press
Updated to latest 1.25 and fixed issue with not being able to spawn multiple playwright instances
…` panicked as browser is None. Now checking if browser is actually set.
ConsoleMessage structure was changed, which caused playwright to fail if there was any console messages.
@tmahmood
Copy link

tmahmood commented Oct 31, 2023

Hello @SamuelMarks, Great work!

Thank you for asking, I believe it's better to have everything here, where all started. If I can work on this again, I can always merge mine with your changes and continue.

@satvikpendem
Copy link

I've been looking into using either this or thirtyfour, but it looks like this crate is not actively maintained anymore. How would you be able to merge in the PRs as it seems only @octaltree has write access? Or would a fork / repository handover be possible?

@n8henrie
Copy link

n8henrie commented Dec 1, 2023

@SamuelMarks I'm unable to build from your PR -- what os/arch are on you using?

Initially tried to checkout the 1.25 and git apply <(curl 'https://github.com/octaltree/playwright-rust/pull/51.patch') but unfortunately neither this patch nor #49 applies cleanly (either to master or 1.25), so it's possible that they need a rebase. Thankfully gh checkout pr 51 (or something to that effect) worked fine.

However, once there I get a done of errors with an attempted build:

$ git rev-parse HEAD
a73c5b9d98c3fef0ac6fc01b5b0a37226f4c3dae
$ cargo build --release
   Compiling playwright v0.0.20 (/Users/n8henrie/git/playwright-rust)
error[E0412]: cannot find type `InitializerDeviceDescriptorsDescriptorDefaultBrowserType` in module `protocol`
   --> src/imp/playwright.rs:105:41
    |
105 |     pub default_browser_type: protocol::InitializerDeviceDescriptorsDescriptorDefaultBrowserType
    |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `protocol`
    |
help: consider importing this enum
    |
1   + use crate::protocol::generated::local_utils::InitializerDeviceDescriptorsDescriptorDefaultBrowserType;
    |
help: if you import `InitializerDeviceDescriptorsDescriptorDefaultBrowserType`, refer to it directly
    |
105 -     pub default_browser_type: protocol::InitializerDeviceDescriptorsDescriptorDefaultBrowserType
105 +     pub default_browser_type: InitializerDeviceDescriptorsDescriptorDefaultBrowserType
    |

error[E0412]: cannot find type `InitializerDeviceDescriptors` in module `protocol`
   --> src/imp/playwright.rs:108:24
    |
108 | impl TryFrom<protocol::InitializerDeviceDescriptors> for DeviceDescriptor {
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `protocol`
    |
help: consider importing this struct
    |
1   + use crate::protocol::generated::local_utils::InitializerDeviceDescriptors;
    |
help: if you import `InitializerDeviceDescriptors`, refer to it directly
    |
108 - impl TryFrom<protocol::InitializerDeviceDescriptors> for DeviceDescriptor {
108 + impl TryFrom<InitializerDeviceDescriptors> for DeviceDescriptor {
    |

error[E0412]: cannot find type `InitializerDeviceDescriptors` in module `protocol`
   --> src/imp/playwright.rs:110:30
    |
110 |     fn try_from(x: protocol::InitializerDeviceDescriptors) -> Result<Self, Self::Error> {
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `protocol`
    |
help: consider importing this struct
    |
1   + use crate::protocol::generated::local_utils::InitializerDeviceDescriptors;
    |
help: if you import `InitializerDeviceDescriptors`, refer to it directly
    |
110 -     fn try_from(x: protocol::InitializerDeviceDescriptors) -> Result<Self, Self::Error> {
110 +     fn try_from(x: InitializerDeviceDescriptors) -> Result<Self, Self::Error> {
    |

error[E0422]: cannot find struct, variant or union type `InitializerDeviceDescriptors` in module `protocol`
   --> src/imp/playwright.rs:111:23
    |
111 |         let protocol::InitializerDeviceDescriptors {
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `protocol`
    |
help: consider importing this struct
    |
1   + use crate::protocol::generated::local_utils::InitializerDeviceDescriptors;
    |
help: if you import `InitializerDeviceDescriptors`, refer to it directly
    |
111 -         let protocol::InitializerDeviceDescriptors {
111 +         let InitializerDeviceDescriptors {
    |

error[E0422]: cannot find struct, variant or union type `InitializerDeviceDescriptorsDescriptor` in module `protocol`
   --> src/imp/playwright.rs:114:27
    |
114 |                 protocol::InitializerDeviceDescriptorsDescriptor {
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `protocol`
    |
help: consider importing this struct
    |
1   + use crate::protocol::generated::local_utils::InitializerDeviceDescriptorsDescriptor;
    |
help: if you import `InitializerDeviceDescriptorsDescriptor`, refer to it directly
    |
114 -                 protocol::InitializerDeviceDescriptorsDescriptor {
114 +                 InitializerDeviceDescriptorsDescriptor {
    |

error[E0412]: cannot find type `InitializerDeviceDescriptorsDescriptorScreen` in module `protocol`
   --> src/imp/playwright.rs:141:24
    |
141 | impl TryFrom<protocol::InitializerDeviceDescriptorsDescriptorScreen> for Viewport {
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `protocol`
    |
help: consider importing this struct
    |
1   + use crate::protocol::generated::local_utils::InitializerDeviceDescriptorsDescriptorScreen;
    |
help: if you import `InitializerDeviceDescriptorsDescriptorScreen`, refer to it directly
    |
141 - impl TryFrom<protocol::InitializerDeviceDescriptorsDescriptorScreen> for Viewport {
141 + impl TryFrom<InitializerDeviceDescriptorsDescriptorScreen> for Viewport {
    |

error[E0412]: cannot find type `InitializerDeviceDescriptorsDescriptorScreen` in module `protocol`
   --> src/imp/playwright.rs:144:22
    |
144 |         x: protocol::InitializerDeviceDescriptorsDescriptorScreen
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `protocol`
    |
help: consider importing this struct
    |
1   + use crate::protocol::generated::local_utils::InitializerDeviceDescriptorsDescriptorScreen;
    |
help: if you import `InitializerDeviceDescriptorsDescriptorScreen`, refer to it directly
    |
144 -         x: protocol::InitializerDeviceDescriptorsDescriptorScreen
144 +         x: InitializerDeviceDescriptorsDescriptorScreen
    |

error[E0422]: cannot find struct, variant or union type `InitializerDeviceDescriptorsDescriptorScreen` in module `protocol`
   --> src/imp/playwright.rs:146:23
    |
146 |         let protocol::InitializerDeviceDescriptorsDescriptorScreen { height, width } = x;
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `protocol`
    |
help: consider importing this struct
    |
1   + use crate::protocol::generated::local_utils::InitializerDeviceDescriptorsDescriptorScreen;
    |
help: if you import `InitializerDeviceDescriptorsDescriptorScreen`, refer to it directly
    |
146 -         let protocol::InitializerDeviceDescriptorsDescriptorScreen { height, width } = x;
146 +         let InitializerDeviceDescriptorsDescriptorScreen { height, width } = x;
    |

error[E0412]: cannot find type `InitializerDeviceDescriptorsDescriptorViewport` in module `protocol`
   --> src/imp/playwright.rs:153:24
    |
153 | impl TryFrom<protocol::InitializerDeviceDescriptorsDescriptorViewport> for Viewport {
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `protocol`
    |
help: consider importing this struct
    |
1   + use crate::protocol::generated::local_utils::InitializerDeviceDescriptorsDescriptorViewport;
    |
help: if you import `InitializerDeviceDescriptorsDescriptorViewport`, refer to it directly
    |
153 - impl TryFrom<protocol::InitializerDeviceDescriptorsDescriptorViewport> for Viewport {
153 + impl TryFrom<InitializerDeviceDescriptorsDescriptorViewport> for Viewport {
    |

error[E0412]: cannot find type `InitializerDeviceDescriptorsDescriptorViewport` in module `protocol`
   --> src/imp/playwright.rs:156:22
    |
156 |         x: protocol::InitializerDeviceDescriptorsDescriptorViewport
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `protocol`
    |
help: consider importing this struct
    |
1   + use crate::protocol::generated::local_utils::InitializerDeviceDescriptorsDescriptorViewport;
    |
help: if you import `InitializerDeviceDescriptorsDescriptorViewport`, refer to it directly
    |
156 -         x: protocol::InitializerDeviceDescriptorsDescriptorViewport
156 +         x: InitializerDeviceDescriptorsDescriptorViewport
    |

error[E0422]: cannot find struct, variant or union type `InitializerDeviceDescriptorsDescriptorViewport` in module `protocol`
   --> src/imp/playwright.rs:158:23
    |
158 |         let protocol::InitializerDeviceDescriptorsDescriptorViewport { height, width } = x;
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `protocol`
    |
help: consider importing this struct
    |
1   + use crate::protocol::generated::local_utils::InitializerDeviceDescriptorsDescriptorViewport;
    |
help: if you import `InitializerDeviceDescriptorsDescriptorViewport`, refer to it directly
    |
158 -         let protocol::InitializerDeviceDescriptorsDescriptorViewport { height, width } = x;
158 +         let InitializerDeviceDescriptorsDescriptorViewport { height, width } = x;
    |

warning: ignoring -C extra-filename flag due to -o flag

Some errors have detailed explanations: E0412, E0422.
For more information about an error, try `rustc --explain E0412`.
warning: `playwright` (lib) generated 1 warning
error: could not compile `playwright` (lib) due to 11 previous errors; 1 warning emitted

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

Successfully merging this pull request may close these issues.

5 participants