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

Get Cookie #8

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Get Cookie #8

wants to merge 12 commits into from

Conversation

dhgatjeye
Copy link

Hi,

If that's okey with that for hot/path, We can automize getting the oauth_token withound hand work.

@giacomoferretti
Copy link
Owner

I don't like adding something like Selenium or Playwright because it will break as soon as Google changes a class name or id of an element. What do you think about it?

@dhgatjeye
Copy link
Author

I don't like adding something like Selenium or Playwright because it will break as soon as Google changes a class name or id of an element. What do you think about it?

Hi, maybe we can go like that route, we can manage from one place and like using that tags I don't think that's gonna change, other way I looked at the google apis for the sending request without selenium like just sent httpclient request and wait response but api's are UI interacted. Like I couldn't automize with request-response things, maybe we can use it by making a definition like this, more stable and if it changes(I don't think so) we can manage it from one place, What do you think? Do you think we should add something like this or playwright etc? When I look at the cost-benefit cost, it seems easier to automate for me

SELECTORS = {
        'email_input': '[type="email"], #identifierId, [name="identifier"]',
        'email_next': '#identifierNext button, [name="identifier_next"]',
        'password_input': '[type="password"], [name="password"]',
        'password_next': '#passwordNext button, [name="password_next"]',
        'two_step_heading': '#headingText, [data-help-text]',
        'consent_next': '#signinconsentNext button, [name="consent_next"]'
    }
    
## Example using
email_input = page.wait_for_selector(self.SELECTORS['email_input'])

@giacomoferretti
Copy link
Owner

Yeah, we could do that. What about 2FA? Like the simple one Yes or No, the "complex" one asking for the correct number. This doesn't handle it, right?

@dhgatjeye
Copy link
Author

dhgatjeye commented Feb 6, 2025

Yeah, we could do that. What about 2FA? Like the simple one Yes or No, the "complex" one asking for the correct number. This doesn't handle it, right?

Hi, I added 2FA step,

https://playwright.azureedge.net/builds/chromium/1158/chromium-win64.zip

latest version of the chromium

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.

2 participants