As stated in the link above I have entered below line in the command-line, however receiving pop up window as “Failed to Create Data Directory”. I am assuming some permission issue.
Once you are past that error, you may also setup the ‘Call Object Method’ as described in the doc to keep from having to perform this manually on a CLI.
I was able to reproduce your error, there is an extra back slash before your user profile directory that needs to be removed. This extra character causes the same error on my machine.
In the command listed above, let’s remove the back slash after Dir;
Thank you for providing above resolution option. After running the command-line by removing the back slash. I received the pop up again, but when clicked on OK, it opened the chrome browser. So I am wondering if this browser session has the security disabled?
Woops, I forgot to mention the trailing backslash at the end as well, just after ‘Default’. Windows doesn’t like slashes like that. Let’s remove that last backslash, with it I do see the same error again.
Old = C:\Users\Tester\AppData\Local\Google\Chrome\User Data\Default\
New = C:\Users\Tester\AppData\Local\Google\Chrome\User Data\Default
I see now what is going on. It looks like you are using the same string from the documentation without altering it with the user account name of your machine.
From the doc = "C:\Users\Tester\AppData\Local\Google\Chrome\User Data\Default"
We need to replace ‘Tester’ with whatever the user account name is in your file path.
That was a good catch, thank you so much. It is now opening the chrome browser successfully through command-line. However, having issues when trying to write a code:
For ex: (‘MyUser’ has the correct value, just replacing here for privacy)
I get the red cross saying ‘unexpected identifier’, so if I add the back slash before C and after Default then the error goes. However, then the same issue persists with pop up message and opens the browser I guess without security disabled.
Those backslashes are going to be required when executing this in the IDE as Python code, we just needed to remove them for basic CLI interaction.
For Python and the TC IDE, you will receive that error if you do not have the indentions correct. I would make sure you’re indenting properly, and add those slashes back.
For instance, this is how I have mine setup and launches Chrome without any popups.
Finally, its working now. I am able to access the object within iFrame. Thank you so much for your help. Actually, I had written the code exact the same way as your above but for some reason it didn’t work earlier and now its working with no change. Now sure. So thanks again for your help.
Looks like this issue is not completely resolved. I can open the chrome browser with my code, however I still get the dialog box with Failed to Create Data Directory message while executing my script but once I manually click on OK button then the script continues and enters the URL that open the browser with disabled security version and it performs other actions and access the iFrame object as well.
Does anyone has any resolution for my issue above? I am adding my query again below:
I can open the chrome browser to access iFrame with my code, however I still get the dialog box with ‘Failed to Create Data Directory’ message but once I manually click on OK button the script continues and enters the URL that open the browser with disabled security version and it performs other actions and access the iFrame object fine. However, how can I avoid getting the dialog box in the beginning?
Well there are couple of issues here, first is that you will need to change all () to and add additional backslashes for formatting. You may reference my code above to see what I mean. Once I did that I was able to launch a browser without issue.
You may want to look into possibly starting TestComplete as an Administrator to see if that will help. If you alter your code to match mine and still receive this error then I would begin to investigate your users permissions on the machine.