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

Feat: Add .print() command in nightwatch. #4198

Open
Ayush-Vish opened this issue Apr 28, 2024 · 5 comments
Open

Feat: Add .print() command in nightwatch. #4198

Ayush-Vish opened this issue Apr 28, 2024 · 5 comments

Comments

@Ayush-Vish
Copy link
Contributor

Description

This command will return a PDF of the paginated pages, which will be helpful for the overall view of the website.
This pdf will be shown in the respective HTML Report.

Suggested solution

No response

Alternatives / Workarounds

No response

Additional Information

No response

@Ayush-Vish
Copy link
Contributor Author

@garg3133 Should I add this command in Nightwatch? It is there in the W3C webdriver.

@pujagani
Copy link
Member

@Ayush-Vish Yes, it is a good idea to go ahead with it. All major the browsers support printing https://wpt.fyi/results/webdriver/tests/classic/print?label=master&label=experimental&aligned&view=subtest
The Nightwatch print command can be mapped to the Selenium print command https://github.com/SeleniumHQ/selenium/blob/4f457b14e06cb28693a64750b4e6960b13ccbe4a/javascript/node/selenium-webdriver/lib/webdriver.js#L1176.

@Ayush-Vish
Copy link
Contributor Author

Ayush-Vish commented May 22, 2024

@pujagani Definitely, I will come up with a solution to implement it.

@pujagani
Copy link
Member

Nightwatch has a "method-mappings.js" class which maps Nightwatch methods to the underlying Selenium method. That might be a good place to start.

@Ayush-Vish
Copy link
Contributor Author

@pujagani Absolutely, I'll definitely check that out!

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

No branches or pull requests

2 participants