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

Show only iFrame #20

Closed
p4rkrs opened this issue May 2, 2020 · 6 comments
Closed

Show only iFrame #20

p4rkrs opened this issue May 2, 2020 · 6 comments

Comments

@p4rkrs
Copy link

p4rkrs commented May 2, 2020

Good morning, sir,

I would like to make a system that allows the user to solve ReCaptcha himself. I've already taken the iFrame, but I'd like to know if it's possible to display only that (e.g. embed it in an electron app, or just display the captcha alone).

Here is my current code:

frame01 := page.Timeout(3 * time.Minute).ElementX("/html/body/div[3]/div[2]/iframe").Frame()
// Doesn't work
frame01.WindowFullscreen()

Thanks for your help!

@p4rkrs p4rkrs added the question Questions related to rod label May 2, 2020
@ysmood
Copy link
Member

ysmood commented May 2, 2020

Yes, you can, like this:

frame01 := page.Timeout(3 * time.Minute).ElementX("/html/body/div[3]/div[2]/iframe").Frame()

// frame is just a Page, you have all the functions that Page has
frame01.ElementX("/xpath/to/captcha.jpg").Screenshot()

@p4rkrs
Copy link
Author

p4rkrs commented May 2, 2020

Yes, you can, like this:

frame01 := page.Timeout(3 * time.Minute).ElementX("/html/body/div[3]/div[2]/iframe").Frame()

// frame is just a Page, you have all the functions that Page has
frame01.ElementX("/xpath/to/captcha.jpg").Screenshot()

Thanks for the answer, but it doesn't looks like something that I want. I want it to be interactive, so the user can PRESS on the button himself, like this:

https://cutie.wtf/s9ryT9MX.mp4

Where it shows only the captcha for the user. Or maybe they are taking the whole iFrame, and showing in on a seperated page?

@ysmood
Copy link
Member

ysmood commented May 2, 2020

So you want Rod to pause at the captcha input step, and let the user finish the captcha manually?

If that's true, then this ticket won't be a Rod related question anymore.

@p4rkrs
Copy link
Author

p4rkrs commented May 2, 2020

So you want Rod to pause at the captcha input step, and let the user finish the captcha manually?

If that's true, then this ticket won't be a Rod related question anymore.

Yes.

@ysmood
Copy link
Member

ysmood commented May 2, 2020

Then it's a product design problem. If I were you I will:

  1. open the login window page := browser.Page("http://login.com")
  2. change the size of the window with page.Window(0,0, width_only_for_captcha, height_only_for_captcha)
  3. scroll to the captcha el := page.Element("/xpath/to/captcha").ScrollIntoView() to
  4. wait for the user to finish the captcha el.WaitInvisible()

I hope it helps.

@ysmood ysmood removed the question Questions related to rod label May 2, 2020
@ysmood
Copy link
Member

ysmood commented May 3, 2020

I think I can close it for now. If you still want to discuss please come to the chat room

@ysmood ysmood closed this as completed May 3, 2020
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