Forum Discussion
4 Replies
- HKosovaSmartBear Alumni (Retired)
You can specify command-line arguments for a browser in the RunOptions before running the browser. Note that --disable-web-security also requires --user-data-dir=<ProfilePath>.
Browsers.Item("chrome").RunOptions = "--disable-web-security --user-data-dir=""C:\Chrome test session""" Call Browsers.Item("chrome").Run("https://smartbear.com")
More info: Launching Browsers
- AshokKumarSahooContributor
HKosovaThank you for your reply.I tried to use your code ,but it's not working for me.Please refer below screen shot for your reference.could you please guide me what might be the reason for this error.I would love your code which you used 'Runoptions' property.could you please explain more on <profile path> on this parameter arguments.Thanks.
Thanks & Regards,
Ashok
- sanjay0288Frequent Contributor
Create a shortcut to your chrome, and then in the shortcut properties add the parameter --disable-web-security at the end of the chrome executable path and then run this shortcut through testcomplete
- AshokKumarSahooContributor
sanjay0288 Thank you.I thought this way.however this way will not work one system to another system.One more issue if same icons are available on taskbar and start menu,then test complete will run chrome as normal mode.
I deleted all chrome icons in my system except icon on desktop and used below codes ,Its working fine.
StrURL="http://XXXXX"
Set ObjShell = CreateObject("Wscript.Shell")
ObjShell.Run "C:\Users\username\Desktop\Chrome64_48.0.2564.109\chrome.exe --disable-web-security"
wait(2)
ObjShell.sendkeys(StrURL)
sys.Keys "[Enter]":wait(1)Thanks & Regards,
Ashok
Related Content
- 13 years agojyothi_priya
- 3 years agosth2ot
- 8 years agoWestManBruce
- 3 years agokimmatsumoto
Recent Discussions
- 8 hours agomegha_phophalia
Log functions
Solved8 hours agoAurore- 17 hours agoMW_Didata
- 18 hours agoNaynab