OPTS="$(compgen -A file $CUR)"
compopt -o nospace
else
- OPTS="--run --disable --feature --switch-completely --no-javascript --selenium --selenium-verbose --tags"
+ OPTS="--run --disable --feature --switch-completely --no-javascript --selenium --selenium-download --selenium-verbose --tags"
OPTS="$OPTS $(_list_instances)"
fi
;;
}
),
(
+ ['--selenium-download'],
+ {
+ 'action': 'store_true',
+ 'dest': 'seleniumforcedl',
+ 'help': 'force the download of the latest Selenium to the cache'
+ }
+ ),
+ (
['--selenium-verbose'],
{
'action': 'store_true',
seleniumPath = os.path.expanduser(os.path.join(self.C.get('dirs.mdk'), 'selenium.jar'))
if args.selenium:
seleniumPath = args.selenium
- elif not nojavascript and not os.path.isfile(seleniumPath):
+ elif args.seleniumforcedl or (not nojavascript and not os.path.isfile(seleniumPath)):
logging.info('Attempting to find a download for Selenium')
url = urllib.urlopen('http://docs.seleniumhq.org/download/')
content = url.read()
else:
logging.warning('Could not locate Selenium server to download')
- if not os.path.isfile(seleniumPath):
+ if not nojavascript and not os.path.isfile(seleniumPath):
raise Exception('Selenium file %s does not exist')
# Run cli