~coreygoldberg/selenium-simple-test/refresh-action

« back to all changes in this revision

Viewing changes to src/sst/selftests/static_file.py

  • Committer: Tarmac
  • Author(s): Corey Goldberg
  • Date: 2012-03-07 21:18:25 UTC
  • mfrom: (263.1.3 trunk)
  • Revision ID: tarmac@199959-20120307211825-423wk4iboowugtbu
[r=coreygoldberg],[bug=943155] added the ability to handle file based urls

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
# test for loading local files by file:// rather than http://
 
3
 
 
4
import os
 
5
 
 
6
from sst.actions import *
 
7
 
 
8
 
 
9
static_file = os.path.join(''.join(os.path.split(__file__)[:-1]), 'static.html')
 
10
 
 
11
# using full path
 
12
go_to('file:////%s' % static_file)
 
13
assert_title('The Static Page')
 
14
assert_element(tag='h1', text='Hello World')
 
15
 
 
16
# using base_url
 
17
set_base_url('file:////')
 
18
go_to(static_file)
 
19
assert_title('The Static Page')
 
20
assert_element(tag='h1', text='Hello World')