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

I have a print button on UI, on clicking that the print dialog box doesn't open in browser launched from rod. #1022

Open
sunaynat opened this issue Mar 8, 2024 · 6 comments
Labels
needs info The description is not enough to tackle the problem question Questions related to rod

Comments

@sunaynat
Copy link

sunaynat commented Mar 8, 2024

Rod Version: v0.114.7

The code to demonstrate your question

What you got

I have a print button on UI, on clicking that the print dialog box doesn't open in browser launched from rod, but works fine when I normally open the same link.
But if I use ctrl+p it opens the dialog box.

What you expect to see

I expect the print button to open the print dialog box.

@sunaynat sunaynat added the question Questions related to rod label Mar 8, 2024
Copy link

github-actions bot commented Mar 8, 2024

Please fix the format of your markdown:

12:56 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]

generated by check-issue

@sunaynat
Copy link
Author

Also tried keyboard events, but doesn't open print window

// page.KeyActions().Press(input.MetaLeft).Type(input.KeyP).MustDo()
// page.KeyActions().Press(input.ControlLeft).Type(input.KeyP).MustDo()
// page.KeyActions().Press(input.ControlRight).Type(input.KeyP).MustDo()
// page.KeyActions().Press(input.MetaRight).Type(input.KeyP).MustDo()
// page.KeyActions().Press(input.MetaRight).Type(input.KeyP).MustDo()
// page.KeyActions().Press(input.ShiftLeft).Type(input.KeyP).MustDo()
// page.KeyActions().Press(input.ShiftRight).Type(input.KeyP).MustDo()
//page.KeyActions().Press(input.PrintScreen).Type(input.KeyV).MustDo()

@sunaynat
Copy link
Author

tried mouse events also , doesn't open print window
// page.Mouse.Click(proto.InputMouseButtonRight, 1)
// page.Mouse.Down(proto.InputMouseButtonLeft, 4)
// page.Mouse.Click(proto.InputMouseButtonLeft, 1)

@sunaynat
Copy link
Author

tried using page.MustEval(window.print()), window opens, but debugger control doesn't comes out of the method, if I manually perform action on the window, I get error test panicked: eval js error: TypeError: Cannot read properties of undefined (reading 'apply')

@ysmood
Copy link
Collaborator

ysmood commented Mar 11, 2024

How to reproduce your issue? Could you provide reproducible code?

@ysmood ysmood added the needs info The description is not enough to tackle the problem label Mar 11, 2024
@sunaynat
Copy link
Author

sunaynat commented Mar 11, 2024

I am using mac, browser chrome. want to get print screen and get the devtools information of the print screen. anything which can achieve this would be helpful.

used page.MustEval(window.print()) for window print, which opened the print window but doesn't come out and gives above error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs info The description is not enough to tackle the problem question Questions related to rod
Projects
None yet
Development

No branches or pull requests

2 participants