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

Set awt headless by default #99

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Set awt headless by default #99

wants to merge 1 commit into from

Conversation

anna-shchurok
Copy link
Collaborator

Here is couple of concerns:

  1. Setting headless property by default. On the one hand we let users to not write headless() each time they face the issue Could not initialize class sun.awt.X11GraphicsEnvironment, on the other - there are can be users which have AWT in their project and they don't need to be headless and they will be struggling to seek the cause. So here is the choice between having issue and write headless each time or having issue and seek of it and write headless(false). My opinion having property by default will be better for bigger amount of users.
  2. Coding. The way it is done right now will require to write 2 lines like
Shutterbug.configure().headless(false);
Shutterbug.shootPage(driver).save();

Another way of implementing this is having Singleton of Shuttebug class and return the instance of it.
in this case it is possible to write like Shutterbug.headless(false).shootPage(driver);, but we will call static methods on instance, which is 😩 you know.

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.

3 participants