Jump to content
AI123

Can I start Chrome with a bookmark bar?

Recommended Posts

[My code is at bottom.]

a)

Hello, is it possible to start Chrome from AutoIt with a bookmark bar?

If yes I think I have to set something at $sDesiredCapabilities. But what have I to set there?

Now I have this there:

$sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"unhandledPromptBehavior": "ignore", ' & _
    '"goog:chromeOptions": {"w3c": true, "excludeSwitches": ["enable-automation"], "useAutomationExtension": false, ' & _
    '"prefs": {"credentials_enable_service": false},' & _
    '"args": ["start-maximized"] }}}}'

b)

Can I start a Chrome browser in a special directory?

The problem is that AutoIt starts a Chrome browser but not the one I'm using.

I think I have to set the directory of the Chrome browser I use normally. But how can I do it?

I want to start my Chrome Browser where I have bookmark bars and extensions.

But my code starts a "clean" Chrome browser.

This is my code:

 

#include "wd_core.au3"
#include "wd_helper.au3"

Local $sDesiredCapabilities, $sSession
SetupChrome()

_WD_Startup()

$sSession = _WD_CreateSession($sDesiredCapabilities)
_WD_Navigate($sSession, "https://www.facebook.com")

$sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//button[@title='Alle akzeptieren']")
_WD_ElementAction($sSession,$sElement,'click')

_ChromeSetInputValueById($sSession,'email','abc')
_ChromeSetInputValueById($sSession,'pass','xyz')

$sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@name='firstname']")
_WD_ElementAction($sSession,$sElement,'value', 'meinvorname')

_WD_Shutdown()


Func SetupChrome()
  _WD_Option('Driver', 'C:\Users\q\Downloads\chromedriver_win32_86_0_4240_22\chromedriver.exe')
  _WD_Option('Port', 9515)
  _WD_Option('DriverParams', '--log-path=' & @ScriptDir & '\chrome.log')
  $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"unhandledPromptBehavior": "ignore", ' & _
    '"goog:chromeOptions": {"w3c": true, "excludeSwitches": ["enable-automation"], "useAutomationExtension": false, ' & _
    '"prefs": {"credentials_enable_service": false},' & _
    '"args": ["start-maximized"] }}}}'
EndFunc

Func _ChromeSetInputValueById($sSession,$Id,$Value)
    $sButton = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@id='"&$Id&"']")
    _WD_ElementAction($sSession,$sButton,'value', $Value)
EndFunc

 

 

Edited by AI123

Share this post


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

You need to specify the user profile you want to use. Check out FAQ #3 (see link in my sig)

Thank you. I changed $sDesiredCapabilities to this:

$sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"unhandledPromptBehavior": "ignore", ' & _
    '"goog:chromeOptions": {"w3c": true, "excludeSwitches": ["enable-automation"], "useAutomationExtension": false, ' & _
    '"prefs": {"credentials_enable_service": false},' & _
    '"args":["start-maximized", "--user-data-dir=C:\\Users\\' & @UserName & _
    '\\AppData\\Local\\Google\\Chrome\\User Data\\", "--profile-directory=Default"] }}}}'

Now Chrome opens with my user profile. But the Facebook site isn't opening anymore. And after a short time the DOS window that the driver opened is closing automatically. And I got this messages in the DOS ChromeDriver window:

Starting ChromeDriver 86.0.4240.22 (398b0743353ff36fb1b82468f63a3a93b4e2e89e-refs/branch-heads/4240@{#378}) on port 9515
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
[25436:3884:1106/161056.312:ERROR:cache_util_win.cc(20)] Unable to move the cache: Zugriff verweigert (0x5)
[25436:3884:1106/161056.313:ERROR:cache_util.cc(140)] Unable to move cache folder C:\Users\q\AppData\Local\Google\Chrome\User Data\ShaderCache\GPUCache to C:\Users\q\AppData\Local\Google\Chrome\User Data\ShaderCache\old_GPUCache_000
[25436:3884:1106/161056.313:ERROR:disk_cache.cc(184)] Unable to create cache
[25436:3884:1106/161056.314:ERROR:shader_disk_cache.cc(606)] Shader Cache Creation failed: -2
Wird in einer aktuellen Browsersitzung ge÷ffnet.

I have opened another ChromeBrowser before I start. Could that be the problem? And how can I solve this problem?

I want to work the script with other opened Chrome browsers.

("Zugriff verweigert" is like "Acces denied" in English.

"Wird in einer aktuellen Browsersitzung geöffnet" is like "Is opening in a current Browser session")

Edited by AI123

Share this post


Link to post
Share on other sites
5 hours ago, AI123 said:

Now Chrome opens with my user profile. But the Facebook site isn't opening anymore.

It might help if you show us the contents of the Scite output panel

Quote

I have opened another ChromeBrowser before I start. Could that be the problem? And how can I solve this problem?

Not sure... could be. You haven't explained why you've done this. Care to now?

Quote

I want to work the script with other opened Chrome browsers.

If another Chrome instance is already open and using this same profile, then you are likely running into conflicts where the initial instance has file locks that are preventing the 2nd instance from working correctly.

Plus, you can't interact with existing Chrome instances unless they are launched with some additional options. See this recent post for more details --

 

Share this post


Link to post
Share on other sites

I want to run an AutoIt script in a separate browser so I can do other things in other browsers.

I have now tested to run only the browser that is starting by the script. That worked perfectly.

So the problem should be what you said - file locks and/or missing options to interact with existing Chrome instances.

This is the Scite output panel if other Chrome browser(s) are/is running before I start the script:

>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "D:\Dokumente\FragenAntworten\AutoIt\AutoItChromeAutomatisierenInfo\wd_demo.au3" /UserParams    
+>00:36:51 Starting AutoIt3Wrapper v.18.708.1148.0 SciTE v.4.1.0.0   Keyboard:00000407  OS:WIN_10/  CPU:X64 OS:X64  Environment(Language:0407)  CodePage:0  utf8.auto.check:4
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\q\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\q\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.14.5)  from:C:\Program Files (x86)\AutoIt3  input:D:\Dokumente\FragenAntworten\AutoIt\AutoItChromeAutomatisierenInfo\wd_demo.au3
+>00:36:51 AU3Check ended.rc:0
>Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3.exe "D:\Dokumente\FragenAntworten\AutoIt\AutoItChromeAutomatisierenInfo\wd_demo.au3"    
--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
_WDStartup: OS: WIN_10 WIN32_NT 19041 
_WDStartup: AutoIt: 3.3.14.5
_WDStartup: WD.au3: 0.1.0.20
_WDStartup: Driver: C:\Users\q\Downloads\chromedriver_win32_86_0_4240_22\chromedriver.exe
_WDStartup: Params: --log-path=D:\Dokumente\FragenAntworten\AutoIt\AutoItChromeAutomatisierenInfo\chrome.log
_WDStartup: Port:   9515
__WD_Post: URL=HTTP://127.0.0.1:9515/session; $sData={"capabilities": {"alwaysMatch": {"unhandledPromptBehavior": "ignore", "goog:chromeOptions": {"w3c": true, "excludeSwitches": ["enable-automation"], "useAutomationExtension": false, "prefs": {"credentials_enable_service": false},"args":["start-maximized", "--user-data-dir=C:\\Users\\q\\AppData\\Local\\Google\\Chrome\\User Data\\", "--profile-directory=Default"] }}}}
__WD_Post: StatusCode=400; ResponseText={"value":{"error":"invalid argument","message":"invalid argument: user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir","stacktrace":"Backtrace:\n\tOrdinal0 [0x011BC013+3194899]\n\tOrdinal0 [0x010A6021+2056225]\n\tOrdinal0 [0x00F3F608+587272]\n\tOrdinal0 [0x00EBF28A+62090]\n\tOrdinal0 [0x00EBC64A+50762]\n\tOrdinal0 [0x00EE1EE9+204521]\n\tOrdinal0 [0x00EE1D0D+204045]\n\tOrdinal0 [0x00EDFC1B+195611]\n\tOrdinal0 [0x00EC3B7F+80767]\n\tOrdinal0 [0x00EC4B4E+84814]\n\tOrdinal0 [0x00EC4AD9+84697]\n\tOrdinal0 [0x010BCE64+2149988]\n\tGetHandleVerifier [0x0132BE95+1400773]\n\tGetHandleVerifier [0x0132BB61+1399953]\n\tGetHandleVerifier [0x013331FA+1430314]\n\tGetHandleVerifier [0x0132C69F+1402831]\n\tOrdinal0 [0x010B3D61+2112865]\n\tOrdinal0 [0x010BE5CB+2155979]\n\tOrdinal0 [0x010BE6F5+2156277]\n\tOrdinal0 [0x010CF26E+2224750]\n\tBaseThreadInitThunk [0x779AFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77B775F4+228]\n\tRtlGetAppContainerNamedObjectPath [0x77B775C4+180]\n"}}
_WD_CreateSession: {"value":{"error":"invalid argument","message":"invalid argument: user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir","stacktrace":"Backtrace:\n\tOrdinal0 [0x011BC013+3194899]\n\tOrdinal0 [0x010A6021+2056225]\n\tOrdinal0 [0x00F3F608+587272]\n\tOrdinal0 [0x00EBF28A+62090]\n\tOrdinal0 [0x00EBC64A+50762]\n\tOrdinal0 [0x00EE1EE9+204521]\n\tOrdinal0 [0x00EE1D0D+204045]\n\tOrdinal0 [0x00EDFC1B+195611]\n\tOrdinal0 [0x00EC3B7F+80767]\n\tOrdinal0 [0x00EC4B4E+84814]\n\tOrdinal0 [0x00EC4AD9+84697]\n\tOrdinal0 [0x010BCE64+2149988]\n\tGetHandleVerifier [0x0132BE95+1400773]\n\tGetHandleVerifier [0x0132BB61+1399953]\n\tGetHandleVerifier [0x013331FA+1430314]\n\tGetHandleVerifier [0x0132C69F+1402831]\n\tOrdinal0 [0x010B3D61+2112865]\n\tOrdinal0 [0x010BE5CB+2155979]\n\tOrdinal0 [0x010BE6F5+2156277]\n\tOrdinal0 [0x010CF26E+2224750]\n\tBaseThreadInitThunk [0x779AFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77B775F4+228]\n\tRtlGetAppContainerNamedObjectPath [0x77B775C4+180]\n"}}
_WD_CreateSession ==> Webdriver Exception: invalid argument: user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir
__WD_Post: URL=HTTP://127.0.0.1:9515/session//url; $sData={"url":"https://www.facebook.com"}
__WD_Post: StatusCode=404; ResponseText={"value":{"error":"invalid session id","message":"invalid session id","stacktrace":"Backtrace:\n\tOrdinal0 [0x011BC013+3194899]\n\tOrdinal0 [0x010A6021+2056225]\n\tOrdinal0 [0x00F3F4B0+586928]\n\tOrdinal0 [0x00EC361B+79387]\n\tOrdinal0 [0x00EDFCE7+195815]\n\tOrdinal0 [0x00EDE35B+189275]\n\tOrdinal0 [0x00EDDFDA+188378]\n\tOrdinal0 [0x00EB2027+8231]\n\tOrdinal0 [0x00EB24F6+9462]\n\tOrdinal0 [0x00EB2B81+11137]\n\tOrdinal0 [0x010BCE64+2149988]\n\tGetHandleVerifier [0x0132BE95+1400773]\n\tGetHandleVerifier [0x0132BB61+1399953]\n\tGetHandleVerifier [0x013331FA+1430314]\n\tGetHandleVerifier [0x0132C69F+1402831]\n\tOrdinal0 [0x010B3D61+2112865]\n\tOrdinal0 [0x00EB1D85+7557]\n\tOrdinal0 [0x00EB1844+6212]\n\tGetHandleVerifier [0x014FE5AC+3311324]\n\tBaseThreadInitThunk [0x779AFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77B775F4+228]\n\tRtlGetAppContainerNamedObjectPath [0x77B775C4+180]\n"}}
_WD_Navigate: {"value":{"error":"invalid session id","message":"invalid session id","stacktrace":"Backtrace:\n\tOrdinal0 [0x011BC013+3194899]\n\tOrdinal0 [0x010A6021+2056225]\n\tOrdinal0 [0x00F3F4B0+586928]\n\tOrdinal0 [0x00EC361B+79387]\n\tOrdinal0 [0x00EDFCE7+195815]\n\tOrdinal0 [0x00EDE35B+189275]\n\tOrdinal0 [0x00EDDFDA+188378]\n\tOrdinal0 [0x00EB2027+8231]\n\tOrdinal0 [0x00EB24F6+9462]\n\tOrdinal0 [0x00EB2B81+11137]\n\tOrdinal0 [0x010BCE64+2149988]\n\tGetHandleVerifier [0x0132BE95+1400773]\n\tGetHandleVerifier [0x0132BB61+1399953]\n\tGetHandleVerifier [0x013331FA+1430314]\n\tGetHandleVerifier [0x0132C69F+1402831]\n\tOrdinal0 [0x010B3D61+2112865]\n\tOrdinal0 [0x00EB1D85+7557]\n\tOrdinal0 [0x00EB1844+6212]\n\tGetHandleVerifier [0x014FE5AC+3311324]\n\tBaseThreadInitThunk [0x779AFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77B775F4+228]\n\tRtlGetAppContainerNamedObjectPath [0x77B775C4+180]\n"}}
__WD_Post: URL=HTTP://127.0.0.1:9515/session//element; $sData={"using":"xpath","value":"//button[@title='Alle akzeptieren']"}
__WD_Post: StatusCode=404; ResponseText={"value":{"error":"invalid session id","message":"invalid session id","stacktrace":"Backtrace:\n\tOrdinal0 [0x011BC013+3194899]\n\tOrdinal0 [0x010A6021+2056225]\n\tOrdinal0 [0x00F3F4B0+586928]\n\tOrdinal0 [0x00EC361B+79387]\n\tOrdinal0 [0x00EDFCE7+195815]\n\tOrdinal0 [0x00EDE35B+189275]\n\tOrdinal0 [0x00EDDFDA+188378]\n\tOrdinal0 [0x00EB2027+8231]\n\tOrdinal0 [0x00EB24F6+9462]\n\tOrdinal0 [0x00EB2B81+11137]\n\tOrdinal0 [0x010BCE64+2149988]\n\tGetHandleVerifier [0x0132BE95+1400773]\n\tGetHandleVerifier [0x0132BB61+1399953]\n\tGetHandleVerifier [0x013331FA+1430314]\n\tGetHandleVerifier [0x0132C69F+1402831]\n\tOrdinal0 [0x010B3D61+2112865]\n\tOrdinal0 [0x00EB1D85+7557]\n\tOrdinal0 [0x00EB1844+6212]\n\tGetHandleVerifier [0x014FE5AC+3311324]\n\tBaseThreadInitThunk [0x779AFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77B775F4+228]\n\tRtlGetAppContainerNamedObjectPath [0x77B775C4+180]\n"}}
_WD_FindElement: {"value":{"error":"invalid session id","message":"invalid session id","stacktrace":"Backtrace:\n\tOrdinal0 [0x011BC013+3194899]\n\tOrdinal0 [0x010A6021+2056225]\n\tOrdinal0 [0x00F3F4B0+586928]\n\tOrdinal0 [0x00EC361B+79387]\n\tOrdinal0 [0x00EDFCE7+195815]\n\tOrdinal0 [0x00EDE35B+189275]\n\tOrdinal0 [0x00EDDFDA+188378]\n\tOrdinal0 [0x00EB2027+8231]\n\tOrdinal0 [0x00EB24F6+9462]\n\tOrdinal0 [0x00EB2B81+11137]\n\tOrdinal0 [0x010BCE64+2149988]\n\tGetHandleVerifier [0x0132BE95+1400773]\n\tGetHandleVerifier [0x0132BB61+1399953]\n\tGetHandleVerifier [0x013331FA+1430314]\n\tGetHandleVerifier [0x0132C69F+1402831]\n\tOrdinal0 [0x010B3D61+2112865]\n\tOrdinal0 [0x00EB1D85+7557]\n\tOrdinal0 [0x00EB1844+6212]\n\tGetHandleVerifier [0x014FE5AC+3311324]\n\tBaseThreadInitThunk [0x779AFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77B775F4+228]\n\tRtlGetAppContainerNamedObjectPath [0x77B775C4+180]\n"}}
_WD_FindElement ==> Webdriver Exception: HTTP status = 404
__WD_Post: URL=HTTP://127.0.0.1:9515/session//element//click; $sData={"id":""}
__WD_Post: StatusCode=404; ResponseText={"value":{"error":"invalid session id","message":"invalid session id","stacktrace":"Backtrace:\n\tOrdinal0 [0x011BC013+3194899]\n\tOrdinal0 [0x010A6021+2056225]\n\tOrdinal0 [0x00F3F4B0+586928]\n\tOrdinal0 [0x00EC361B+79387]\n\tOrdinal0 [0x00EDFCE7+195815]\n\tOrdinal0 [0x00EDE35B+189275]\n\tOrdinal0 [0x00EDDFDA+188378]\n\tOrdinal0 [0x00EB2027+8231]\n\tOrdinal0 [0x00EB24F6+9462]\n\tOrdinal0 [0x00EB2B81+11137]\n\tOrdinal0 [0x010BCE64+2149988]\n\tGetHandleVerifier [0x0132BE95+1400773]\n\tGetHandleVerifier [0x0132BB61+1399953]\n\tGetHandleVerifier [0x013331FA+1430314]\n\tGetHandleVerifier [0x0132C69F+1402831]\n\tOrdinal0 [0x010B3D61+2112865]\n\tOrdinal0 [0x00EB1D85+7557]\n\tOrdinal0 [0x00EB1844+6212]\n\tGetHandleVerifier [0x014FE5AC+3311324]\n\tBaseThreadInitThunk [0x779AFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77B775F4+228]\n\tRtlGetAppContainerNamedObjectPath [0x77B775C4+180]\n"}}
_WD_ElementAction: {"value":{"error":"invalid session id","message":"invalid session id","stacktrace":"Backtrace:\n\tOr...
_WD_ElementAction ==> Webdriver Exception: {"value":{"error":"invalid session id","message":"invalid session id","stacktrace":"Backtrace:\n\tOrdinal0 [0x011BC013+3194899]\n\tOrdinal0 [0x010A6021+2056225]\n\tOrdinal0 [0x00F3F4B0+586928]\n\tOrdinal0 [0x00EC361B+79387]\n\tOrdinal0 [0x00EDFCE7+195815]\n\tOrdinal0 [0x00EDE35B+189275]\n\tOrdinal0 [0x00EDDFDA+188378]\n\tOrdinal0 [0x00EB2027+8231]\n\tOrdinal0 [0x00EB24F6+9462]\n\tOrdinal0 [0x00EB2B81+11137]\n\tOrdinal0 [0x010BCE64+2149988]\n\tGetHandleVerifier [0x0132BE95+1400773]\n\tGetHandleVerifier [0x0132BB61+1399953]\n\tGetHandleVerifier [0x013331FA+1430314]\n\tGetHandleVerifier [0x0132C69F+1402831]\n\tOrdinal0 [0x010B3D61+2112865]\n\tOrdinal0 [0x00EB1D85+7557]\n\tOrdinal0 [0x00EB1844+6212]\n\tGetHandleVerifier [0x014FE5AC+3311324]\n\tBaseThreadInitThunk [0x779AFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77B775F4+228]\n\tRtlGetAppContainerNamedObjectPath [0x77B775C4+180]\n"}}
__WD_Post: URL=HTTP://127.0.0.1:9515/session//element; $sData={"using":"xpath","value":"//input[@id='email']"}
__WD_Post: StatusCode=404; ResponseText={"value":{"error":"invalid session id","message":"invalid session id","stacktrace":"Backtrace:\n\tOrdinal0 [0x011BC013+3194899]\n\tOrdinal0 [0x010A6021+2056225]\n\tOrdinal0 [0x00F3F4B0+586928]\n\tOrdinal0 [0x00EC361B+79387]\n\tOrdinal0 [0x00EDFCE7+195815]\n\tOrdinal0 [0x00EDE35B+189275]\n\tOrdinal0 [0x00EDDFDA+188378]\n\tOrdinal0 [0x00EB2027+8231]\n\tOrdinal0 [0x00EB24F6+9462]\n\tOrdinal0 [0x00EB2B81+11137]\n\tOrdinal0 [0x010BCE64+2149988]\n\tGetHandleVerifier [0x0132BE95+1400773]\n\tGetHandleVerifier [0x0132BB61+1399953]\n\tGetHandleVerifier [0x013331FA+1430314]\n\tGetHandleVerifier [0x0132C69F+1402831]\n\tOrdinal0 [0x010B3D61+2112865]\n\tOrdinal0 [0x00EB1D85+7557]\n\tOrdinal0 [0x00EB1844+6212]\n\tGetHandleVerifier [0x014FE5AC+3311324]\n\tBaseThreadInitThunk [0x779AFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77B775F4+228]\n\tRtlGetAppContainerNamedObjectPath [0x77B775C4+180]\n"}}
_WD_FindElement: {"value":{"error":"invalid session id","message":"invalid session id","stacktrace":"Backtrace:\n\tOrdinal0 [0x011BC013+3194899]\n\tOrdinal0 [0x010A6021+2056225]\n\tOrdinal0 [0x00F3F4B0+586928]\n\tOrdinal0 [0x00EC361B+79387]\n\tOrdinal0 [0x00EDFCE7+195815]\n\tOrdinal0 [0x00EDE35B+189275]\n\tOrdinal0 [0x00EDDFDA+188378]\n\tOrdinal0 [0x00EB2027+8231]\n\tOrdinal0 [0x00EB24F6+9462]\n\tOrdinal0 [0x00EB2B81+11137]\n\tOrdinal0 [0x010BCE64+2149988]\n\tGetHandleVerifier [0x0132BE95+1400773]\n\tGetHandleVerifier [0x0132BB61+1399953]\n\tGetHandleVerifier [0x013331FA+1430314]\n\tGetHandleVerifier [0x0132C69F+1402831]\n\tOrdinal0 [0x010B3D61+2112865]\n\tOrdinal0 [0x00EB1D85+7557]\n\tOrdinal0 [0x00EB1844+6212]\n\tGetHandleVerifier [0x014FE5AC+3311324]\n\tBaseThreadInitThunk [0x779AFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77B775F4+228]\n\tRtlGetAppContainerNamedObjectPath [0x77B775C4+180]\n"}}
_WD_FindElement ==> Webdriver Exception: HTTP status = 404
__WD_Post: URL=HTTP://127.0.0.1:9515/session//element//value; $sData={"id":"", "text":"abc"}
__WD_Post: StatusCode=404; ResponseText={"value":{"error":"invalid session id","message":"invalid session id","stacktrace":"Backtrace:\n\tOrdinal0 [0x011BC013+3194899]\n\tOrdinal0 [0x010A6021+2056225]\n\tOrdinal0 [0x00F3F4B0+586928]\n\tOrdinal0 [0x00EC361B+79387]\n\tOrdinal0 [0x00EDFCE7+195815]\n\tOrdinal0 [0x00EDE35B+189275]\n\tOrdinal0 [0x00EDDFDA+188378]\n\tOrdinal0 [0x00EB2027+8231]\n\tOrdinal0 [0x00EB24F6+9462]\n\tOrdinal0 [0x00EB2B81+11137]\n\tOrdinal0 [0x010BCE64+2149988]\n\tGetHandleVerifier [0x0132BE95+1400773]\n\tGetHandleVerifier [0x0132BB61+1399953]\n\tGetHandleVerifier [0x013331FA+1430314]\n\tGetHandleVerifier [0x0132C69F+1402831]\n\tOrdinal0 [0x010B3D61+2112865]\n\tOrdinal0 [0x00EB1D85+7557]\n\tOrdinal0 [0x00EB1844+6212]\n\tGetHandleVerifier [0x014FE5AC+3311324]\n\tBaseThreadInitThunk [0x779AFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77B775F4+228]\n\tRtlGetAppContainerNamedObjectPath [0x77B775C4+180]\n"}}
_WD_ElementAction: {"value":{"error":"invalid session id","message":"invalid session id","stacktrace":"Backtrace:\n\tOr...
_WD_ElementAction ==> Webdriver Exception: {"value":{"error":"invalid session id","message":"invalid session id","stacktrace":"Backtrace:\n\tOrdinal0 [0x011BC013+3194899]\n\tOrdinal0 [0x010A6021+2056225]\n\tOrdinal0 [0x00F3F4B0+586928]\n\tOrdinal0 [0x00EC361B+79387]\n\tOrdinal0 [0x00EDFCE7+195815]\n\tOrdinal0 [0x00EDE35B+189275]\n\tOrdinal0 [0x00EDDFDA+188378]\n\tOrdinal0 [0x00EB2027+8231]\n\tOrdinal0 [0x00EB24F6+9462]\n\tOrdinal0 [0x00EB2B81+11137]\n\tOrdinal0 [0x010BCE64+2149988]\n\tGetHandleVerifier [0x0132BE95+1400773]\n\tGetHandleVerifier [0x0132BB61+1399953]\n\tGetHandleVerifier [0x013331FA+1430314]\n\tGetHandleVerifier [0x0132C69F+1402831]\n\tOrdinal0 [0x010B3D61+2112865]\n\tOrdinal0 [0x00EB1D85+7557]\n\tOrdinal0 [0x00EB1844+6212]\n\tGetHandleVerifier [0x014FE5AC+3311324]\n\tBaseThreadInitThunk [0x779AFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77B775F4+228]\n\tRtlGetAppContainerNamedObjectPath [0x77B775C4+180]\n"}}
__WD_Post: URL=HTTP://127.0.0.1:9515/session//element; $sData={"using":"xpath","value":"//input[@id='pass']"}
__WD_Post: StatusCode=404; ResponseText={"value":{"error":"invalid session id","message":"invalid session id","stacktrace":"Backtrace:\n\tOrdinal0 [0x011BC013+3194899]\n\tOrdinal0 [0x010A6021+2056225]\n\tOrdinal0 [0x00F3F4B0+586928]\n\tOrdinal0 [0x00EC361B+79387]\n\tOrdinal0 [0x00EDFCE7+195815]\n\tOrdinal0 [0x00EDE35B+189275]\n\tOrdinal0 [0x00EDDFDA+188378]\n\tOrdinal0 [0x00EB2027+8231]\n\tOrdinal0 [0x00EB24F6+9462]\n\tOrdinal0 [0x00EB2B81+11137]\n\tOrdinal0 [0x010BCE64+2149988]\n\tGetHandleVerifier [0x0132BE95+1400773]\n\tGetHandleVerifier [0x0132BB61+1399953]\n\tGetHandleVerifier [0x013331FA+1430314]\n\tGetHandleVerifier [0x0132C69F+1402831]\n\tOrdinal0 [0x010B3D61+2112865]\n\tOrdinal0 [0x00EB1D85+7557]\n\tOrdinal0 [0x00EB1844+6212]\n\tGetHandleVerifier [0x014FE5AC+3311324]\n\tBaseThreadInitThunk [0x779AFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77B775F4+228]\n\tRtlGetAppContainerNamedObjectPath [0x77B775C4+180]\n"}}
_WD_FindElement: {"value":{"error":"invalid session id","message":"invalid session id","stacktrace":"Backtrace:\n\tOrdinal0 [0x011BC013+3194899]\n\tOrdinal0 [0x010A6021+2056225]\n\tOrdinal0 [0x00F3F4B0+586928]\n\tOrdinal0 [0x00EC361B+79387]\n\tOrdinal0 [0x00EDFCE7+195815]\n\tOrdinal0 [0x00EDE35B+189275]\n\tOrdinal0 [0x00EDDFDA+188378]\n\tOrdinal0 [0x00EB2027+8231]\n\tOrdinal0 [0x00EB24F6+9462]\n\tOrdinal0 [0x00EB2B81+11137]\n\tOrdinal0 [0x010BCE64+2149988]\n\tGetHandleVerifier [0x0132BE95+1400773]\n\tGetHandleVerifier [0x0132BB61+1399953]\n\tGetHandleVerifier [0x013331FA+1430314]\n\tGetHandleVerifier [0x0132C69F+1402831]\n\tOrdinal0 [0x010B3D61+2112865]\n\tOrdinal0 [0x00EB1D85+7557]\n\tOrdinal0 [0x00EB1844+6212]\n\tGetHandleVerifier [0x014FE5AC+3311324]\n\tBaseThreadInitThunk [0x779AFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77B775F4+228]\n\tRtlGetAppContainerNamedObjectPath [0x77B775C4+180]\n"}}
_WD_FindElement ==> Webdriver Exception: HTTP status = 404
__WD_Post: URL=HTTP://127.0.0.1:9515/session//element//value; $sData={"id":"", "text":"xyz"}
__WD_Post: StatusCode=404; ResponseText={"value":{"error":"invalid session id","message":"invalid session id","stacktrace":"Backtrace:\n\tOrdinal0 [0x011BC013+3194899]\n\tOrdinal0 [0x010A6021+2056225]\n\tOrdinal0 [0x00F3F4B0+586928]\n\tOrdinal0 [0x00EC361B+79387]\n\tOrdinal0 [0x00EDFCE7+195815]\n\tOrdinal0 [0x00EDE35B+189275]\n\tOrdinal0 [0x00EDDFDA+188378]\n\tOrdinal0 [0x00EB2027+8231]\n\tOrdinal0 [0x00EB24F6+9462]\n\tOrdinal0 [0x00EB2B81+11137]\n\tOrdinal0 [0x010BCE64+2149988]\n\tGetHandleVerifier [0x0132BE95+1400773]\n\tGetHandleVerifier [0x0132BB61+1399953]\n\tGetHandleVerifier [0x013331FA+1430314]\n\tGetHandleVerifier [0x0132C69F+1402831]\n\tOrdinal0 [0x010B3D61+2112865]\n\tOrdinal0 [0x00EB1D85+7557]\n\tOrdinal0 [0x00EB1844+6212]\n\tGetHandleVerifier [0x014FE5AC+3311324]\n\tBaseThreadInitThunk [0x779AFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77B775F4+228]\n\tRtlGetAppContainerNamedObjectPath [0x77B775C4+180]\n"}}
_WD_ElementAction: {"value":{"error":"invalid session id","message":"invalid session id","stacktrace":"Backtrace:\n\tOr...
_WD_ElementAction ==> Webdriver Exception: {"value":{"error":"invalid session id","message":"invalid session id","stacktrace":"Backtrace:\n\tOrdinal0 [0x011BC013+3194899]\n\tOrdinal0 [0x010A6021+2056225]\n\tOrdinal0 [0x00F3F4B0+586928]\n\tOrdinal0 [0x00EC361B+79387]\n\tOrdinal0 [0x00EDFCE7+195815]\n\tOrdinal0 [0x00EDE35B+189275]\n\tOrdinal0 [0x00EDDFDA+188378]\n\tOrdinal0 [0x00EB2027+8231]\n\tOrdinal0 [0x00EB24F6+9462]\n\tOrdinal0 [0x00EB2B81+11137]\n\tOrdinal0 [0x010BCE64+2149988]\n\tGetHandleVerifier [0x0132BE95+1400773]\n\tGetHandleVerifier [0x0132BB61+1399953]\n\tGetHandleVerifier [0x013331FA+1430314]\n\tGetHandleVerifier [0x0132C69F+1402831]\n\tOrdinal0 [0x010B3D61+2112865]\n\tOrdinal0 [0x00EB1D85+7557]\n\tOrdinal0 [0x00EB1844+6212]\n\tGetHandleVerifier [0x014FE5AC+3311324]\n\tBaseThreadInitThunk [0x779AFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77B775F4+228]\n\tRtlGetAppContainerNamedObjectPath [0x77B775C4+180]\n"}}
__WD_Post: URL=HTTP://127.0.0.1:9515/session//element; $sData={"using":"xpath","value":"//input[@name='firstname']"}
__WD_Post: StatusCode=404; ResponseText={"value":{"error":"invalid session id","message":"invalid session id","stacktrace":"Backtrace:\n\tOrdinal0 [0x011BC013+3194899]\n\tOrdinal0 [0x010A6021+2056225]\n\tOrdinal0 [0x00F3F4B0+586928]\n\tOrdinal0 [0x00EC361B+79387]\n\tOrdinal0 [0x00EDFCE7+195815]\n\tOrdinal0 [0x00EDE35B+189275]\n\tOrdinal0 [0x00EDDFDA+188378]\n\tOrdinal0 [0x00EB2027+8231]\n\tOrdinal0 [0x00EB24F6+9462]\n\tOrdinal0 [0x00EB2B81+11137]\n\tOrdinal0 [0x010BCE64+2149988]\n\tGetHandleVerifier [0x0132BE95+1400773]\n\tGetHandleVerifier [0x0132BB61+1399953]\n\tGetHandleVerifier [0x013331FA+1430314]\n\tGetHandleVerifier [0x0132C69F+1402831]\n\tOrdinal0 [0x010B3D61+2112865]\n\tOrdinal0 [0x00EB1D85+7557]\n\tOrdinal0 [0x00EB1844+6212]\n\tGetHandleVerifier [0x014FE5AC+3311324]\n\tBaseThreadInitThunk [0x779AFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77B775F4+228]\n\tRtlGetAppContainerNamedObjectPath [0x77B775C4+180]\n"}}
_WD_FindElement: {"value":{"error":"invalid session id","message":"invalid session id","stacktrace":"Backtrace:\n\tOrdinal0 [0x011BC013+3194899]\n\tOrdinal0 [0x010A6021+2056225]\n\tOrdinal0 [0x00F3F4B0+586928]\n\tOrdinal0 [0x00EC361B+79387]\n\tOrdinal0 [0x00EDFCE7+195815]\n\tOrdinal0 [0x00EDE35B+189275]\n\tOrdinal0 [0x00EDDFDA+188378]\n\tOrdinal0 [0x00EB2027+8231]\n\tOrdinal0 [0x00EB24F6+9462]\n\tOrdinal0 [0x00EB2B81+11137]\n\tOrdinal0 [0x010BCE64+2149988]\n\tGetHandleVerifier [0x0132BE95+1400773]\n\tGetHandleVerifier [0x0132BB61+1399953]\n\tGetHandleVerifier [0x013331FA+1430314]\n\tGetHandleVerifier [0x0132C69F+1402831]\n\tOrdinal0 [0x010B3D61+2112865]\n\tOrdinal0 [0x00EB1D85+7557]\n\tOrdinal0 [0x00EB1844+6212]\n\tGetHandleVerifier [0x014FE5AC+3311324]\n\tBaseThreadInitThunk [0x779AFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77B775F4+228]\n\tRtlGetAppContainerNamedObjectPath [0x77B775C4+180]\n"}}
_WD_FindElement ==> Webdriver Exception: HTTP status = 404
__WD_Post: URL=HTTP://127.0.0.1:9515/session//element//value; $sData={"id":"", "text":"meinvorname"}
__WD_Post: StatusCode=404; ResponseText={"value":{"error":"invalid session id","message":"invalid session id","stacktrace":"Backtrace:\n\tOrdinal0 [0x011BC013+3194899]\n\tOrdinal0 [0x010A6021+2056225]\n\tOrdinal0 [0x00F3F4B0+586928]\n\tOrdinal0 [0x00EC361B+79387]\n\tOrdinal0 [0x00EDFCE7+195815]\n\tOrdinal0 [0x00EDE35B+189275]\n\tOrdinal0 [0x00EDDFDA+188378]\n\tOrdinal0 [0x00EB2027+8231]\n\tOrdinal0 [0x00EB24F6+9462]\n\tOrdinal0 [0x00EB2B81+11137]\n\tOrdinal0 [0x010BCE64+2149988]\n\tGetHandleVerifier [0x0132BE95+1400773]\n\tGetHandleVerifier [0x0132BB61+1399953]\n\tGetHandleVerifier [0x013331FA+1430314]\n\tGetHandleVerifier [0x0132C69F+1402831]\n\tOrdinal0 [0x010B3D61+2112865]\n\tOrdinal0 [0x00EB1D85+7557]\n\tOrdinal0 [0x00EB1844+6212]\n\tGetHandleVerifier [0x014FE5AC+3311324]\n\tBaseThreadInitThunk [0x779AFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77B775F4+228]\n\tRtlGetAppContainerNamedObjectPath [0x77B775C4+180]\n"}}
_WD_ElementAction: {"value":{"error":"invalid session id","message":"invalid session id","stacktrace":"Backtrace:\n\tOr...
_WD_ElementAction ==> Webdriver Exception: {"value":{"error":"invalid session id","message":"invalid session id","stacktrace":"Backtrace:\n\tOrdinal0 [0x011BC013+3194899]\n\tOrdinal0 [0x010A6021+2056225]\n\tOrdinal0 [0x00F3F4B0+586928]\n\tOrdinal0 [0x00EC361B+79387]\n\tOrdinal0 [0x00EDFCE7+195815]\n\tOrdinal0 [0x00EDE35B+189275]\n\tOrdinal0 [0x00EDDFDA+188378]\n\tOrdinal0 [0x00EB2027+8231]\n\tOrdinal0 [0x00EB24F6+9462]\n\tOrdinal0 [0x00EB2B81+11137]\n\tOrdinal0 [0x010BCE64+2149988]\n\tGetHandleVerifier [0x0132BE95+1400773]\n\tGetHandleVerifier [0x0132BB61+1399953]\n\tGetHandleVerifier [0x013331FA+1430314]\n\tGetHandleVerifier [0x0132C69F+1402831]\n\tOrdinal0 [0x010B3D61+2112865]\n\tOrdinal0 [0x00EB1D85+7557]\n\tOrdinal0 [0x00EB1844+6212]\n\tGetHandleVerifier [0x014FE5AC+3311324]\n\tBaseThreadInitThunk [0x779AFA29+25]\n\tRtlGetAppContainerNamedObjectPath [0x77B775F4+228]\n\tRtlGetAppContainerNamedObjectPath [0x77B775C4+180]\n"}}
+>00:36:57 AutoIt3.exe ended.rc:0
+>00:36:57 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 7.267

So is there a way to solve the file log problem and the missing options to interact with existing Chrome instances?

Edited by AI123

Share this post


Link to post
Share on other sites
1 hour ago, AI123 said:

_WD_CreateSession ==> Webdriver Exception: invalid argument: user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir

Crazy how the logs often tell you what's wrong, eh? 😉

1 hour ago, AI123 said:

So is there a way to solve the file log problem and the missing options to interact with existing Chrome instances?

I previously linked to a discussion regarding how to properly launch Chrome so that you can later access it via webdriver. To solve the other issue, you may be best to copy the profile and then try launching Chrome using the copied profile.

Share this post


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...