Jump to content

Login google account on chrome


Recommended Posts

Hi guys. very happy to be back. I'm having a problem that I can't auto-login google account on chrome. i tried with webdriver but got invalid device warning. login through other site link all same error. Is there a way I can log into my existing account?
I tried manually controlclick but it's inconvenient to switch to another computer.

thanks for your help!!

Link to post
Share on other sites

I recall a past discussion where some Google sites are blocking automated logins with Webdriver. However, I don't remember which thread. You should be able to use your existing profile as long as another instance of Chrome isn't already using it --

#include "wd_core.au3"

Local $sDesiredCapabilities, $sSession

SetupChrome()
_WD_Startup()
$sSession = _WD_CreateSession($sDesiredCapabilities)
_WD_Navigate($sSession, "https://gmail.com")
ConsoleWrite("URL=" & _WD_Action($sSession, 'url') & @CRLF)

Sleep(5000)

_WD_Shutdown()

Func SetupChrome()
    _WD_Option('Driver', 'chromedriver.exe')
    _WD_Option('Port', 9515)
    _WD_Option('DriverParams', '--verbose --log-path="' & @ScriptDir & '\chrome.log"')

    $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true, "args":["--user-data-dir=C:\\Users\\' & @UserName & '\\AppData\\Local\\Google\\Chrome\\User Data\\", "--profile-directory=Default"]}}}}'
EndFunc   ;==>SetupChrome

P.S. This info is covered in the Webdriver Wiki FAQ section

Link to post
Share on other sites
10 hours ago, Danp2 said:

I recall a past discussion where some Google sites are blocking automated logins with Webdriver. However, I don't remember which thread. You should be able to use your existing profile as long as another instance of Chrome isn't already using it --

#include "wd_core.au3"

Local $sDesiredCapabilities, $sSession

SetupChrome()
_WD_Startup()
$sSession = _WD_CreateSession($sDesiredCapabilities)
_WD_Navigate($sSession, "https://gmail.com")
ConsoleWrite("URL=" & _WD_Action($sSession, 'url') & @CRLF)

Sleep(5000)

_WD_Shutdown()

Func SetupChrome()
    _WD_Option('Driver', 'chromedriver.exe')
    _WD_Option('Port', 9515)
    _WD_Option('DriverParams', '--verbose --log-path="' & @ScriptDir & '\chrome.log"')

    $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true, "args":["--user-data-dir=C:\\Users\\' & @UserName & '\\AppData\\Local\\Google\\Chrome\\User Data\\", "--profile-directory=Default"]}}}}'
EndFunc   ;==>SetupChrome

P.S. This info is covered in the Webdriver Wiki FAQ section

the use of the old configuration is familiar. however i want to initialize large number of users by auto. it makes the following operations better. 

Link to post
Share on other sites
  • Moderators

neypro,

I second Danp2's request.

M23

P.S. And just to be absolutely clear - this is the Mod team determining the legality of the thread, so everyone else please keep out.

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to post
Share on other sites
On 9/8/2021 at 7:23 AM, Danp2 said:

Please elaborate on why you need to do this.

in order to perform related operations google forced me to log in before using. i am managing about 200 personal mail and i want it to be logged in before i start working manually

Link to post
Share on other sites
19 hours ago, Melba23 said:

neypro,

I second Danp2's request.

M23

P.S. And just to be absolutely clear - this is the Mod team determining the legality of the thread, so everyone else please keep out.

oh. I see somehow other people can still create profiles in bulk

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...