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

Ability to provide screen size to the browser as part of setup #8

Open
mhenrixon opened this issue Jan 27, 2022 · 5 comments
Open

Ability to provide screen size to the browser as part of setup #8

mhenrixon opened this issue Jan 27, 2022 · 5 comments

Comments

@mhenrixon
Copy link
Contributor

I would have expected the following to work but it doesn't.

driven_by :evil_cuprite, screen_size: [2800, 2800]

Would you be open to allowing some way of customizing the custom cuprite driver's browser options with a configurable screensize?

@KonnorRogers
Copy link
Owner

Yea of course, I need to dig into how driven_by is created. My best guess is theres some underlying API I can hook onto.

@KonnorRogers
Copy link
Owner

@mhenrixon is this not already possible? I'm looking at the docs, it seems like it should just work.

https://api.rubyonrails.org/classes/ActionDispatch/SystemTestCase.html#method-c-driven_by

What error are you getting? (I'll try to get around to investigating later today)

@mhenrixon
Copy link
Contributor Author

Ruby on Rails has already defined a cuprite driver so your creation of the driver isn't picked up properly.

Perhaps you can use the existing driver and modify the settings but somehow I feel like that would be more work than simply just renaming the driver.

@mhenrixon
Copy link
Contributor Author

Basically nothing works and it complains it can't find the binary (I was using browserless chrome and a chrome url).

@mhenrixon
Copy link
Contributor Author

Can you tell I haven't slept in months? I answered the wrong question...

So, the screensize doesn't work for screenshots. The screenshots seems to have the same size as you defined in the initial driven_by in the gem.

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

2 participants