internet explorer 9 - starting IE9 via vboxmanage guestcontrol can't access localstorage -


we use virtualbox winvista vm testing our javascript app in ie9 (and other windows browsers). test runner, use karma. through karma github located bash script launches ie9 , starts test runner in browser.

this works, biggest part, when want use localstorage "access denied" error. however, when start browser manually in vm, can access localstorage without problem.

it seems starting browser via vboxmanage guestcontrol command user rights prevents browser accessing localstorage directory on hard disk. of course, we're using same user account vboxmanage , running browser hand.

chrome displayed same issue, redirect public directory. we've tried changing registry entry points ie9 localstorage directory, doesn't seem work.

if can't figure out, we'll have fall our previous solution, using selenium webdriver run tests, making karma less useful.

i had entirely exact same problem (if not exactly). after pulling out hair trying use runas.exe load ie correct user, fixed localstorage issue, alas didn't allow karma connect properly.

it turns out latest virtualbox (at time, 4.3) 4.3 version of guest addition makes vboxmanage command load ie correct user , therefore rights access localstorage.

the code used in shell script following:

#!/bin/bash captureurl=$1  vmname="ie9 - win7" login="ieuser" password="passw0rd!" snapshotname="guest2"  vboxmanage snapshot "$vmname" restore "$snapshotname"  vboxmanage startvm "$vmname"  # kill iexplore if it's open vboxmanage guestcontrol "$vmname" execute \   --username "$login" \   --password "$password" \   --image "c:\\windows\\system32\\taskkill.exe" \   --verbose \   --wait-stdout -- "/im" "iexplore.exe" "/f"  # wait network start sleep 10 # can done in better way?  vboxmanage guestcontrol "$vmname" execute \   --username "$login" \   --password "$password" \   --image "c:\\program files\\internet explorer\\iexplore.exe" \   --verbose \   -- "${captureurl/localhost/10.0.2.2}"  # allow ie boot , connect before letting script start sleep 3 

to re-iterate , make more clear, vboxmanage versions < 4.3 loading browsers wrong user, 1 did not have permissions needed localstorage.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -