Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F12419
firefox_profile_test.rb
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 22 2014, 2:29 AM
2014-11-22 02:29:27 (UTC+0)
Size
687 B
Referenced Files
None
Subscribers
None
firefox_profile_test.rb
View Options
require
'watir-webdriver'
permissions_file
=
"/Users/jeffreyhall/Documents/permissions.sqlite"
firefox_executable
=
"/Applications/Firefox.app/Contents/MacOS/firefox"
profile_path
=
"/tmp/NearbyProfile/"
create_directory
=
(
"mkdir "
+
profile_path
)
create_profile
=
(
firefox_executable
+
" -CreateProfile 'NearbyProfile "
+
profile_path
+
"'"
)
copy_permissions
=
(
"cp "
+
permissions_file
+
" "
+
profile_path
)
system
(
create_directory
)
system
(
create_profile
)
system
(
copy_permissions
)
driver
=
Watir
::
Browser
.
new
:firefox
,
:profile
=>
'NearbyProfile'
driver
.
goto
(
'http://en.wikipedia.org/wiki/Special:Nearby'
)
driver
.
goto
(
'http://fr.wikipedia.org/wiki/Spécial:Nearby'
)
driver
.
close
File Metadata
Details
Attached
Mime Type
text/plain
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
11872
Default Alt Text
firefox_profile_test.rb (687 B)
Attached To
Mode
T59333: Figure how to get WebDriver to spoof browser geolocation preferences
Attached
Detach File
Event Timeline
Log In to Comment