Permalink
Browse files

add missing aliases and support remote webdrivers

  • Loading branch information...
1 parent 922c3c7 commit c00bdacf5c55e797ebea4227ce0247cc6ff8a1b2 @ombre42 ombre42 committed Nov 16, 2013
Showing with 13 additions and 6 deletions.
  1. +13 −6 test/acceptance/create_webdriver.txt
View
19 test/acceptance/create_webdriver.txt
@@ -5,8 +5,8 @@ Library Collections
*Test Cases*
Create Webdriver Creates Functioning WebDriver
[Documentation] LOG 2:1 INFO REGEXP: Creating an instance of the \\w+ WebDriver LOG 2:3 DEBUG REGEXP: Created \\w+ WebDriver instance with session id (\\w|-)+
- [Setup] Set Driver Name
- Create Webdriver ${DRIVER NAME} createwebdriver
+ [Setup] Set Driver Variables
+ Create Webdriver ${DRIVER_NAME} kwargs=${KWARGS}
Go To ${FRONT PAGE}
Page Should Contain needle
[Teardown] Close Browser
@@ -22,7 +22,14 @@ Create Webdriver With Bad Keyword Argument Dictionary
Run Keyword And Expect Error kwargs must be a dictionary. Create Webdriver Firefox kwargs={'spam': 'eggs'}
*Keywords*
-Set Driver Name
- ${drivers}= Create Dictionary firefox Firefox ie Ie internetexplorer Ie googlechrome Chrome gc Chrome opera Opera phantomjs PhantomJS safari Safari
- ${name}= Get From Dictionary ${drivers} ${browser.lower().replace(' ', '')}
- Set Test Variable ${DRIVER NAME} ${name}
+Set Driver Variables
+ ${drivers}= Create Dictionary ff Firefox firefox Firefox ie Ie internetexplorer Ie googlechrome Chrome gc Chrome chome Chrome opera Opera phantomjs PhantomJS safari Safari
+ ${name}= Evaluate "Remote" if "${REMOTE_URL}"!="None" else ${drivers}["${BROWSER.lower().replace(' ', '')}"]
+ Set Test Variable ${DRIVER_NAME} ${name}
+ ${dc names}= Create Dictionary ff FIREFOX firefox FIREFOX ie INTERNETEXPLORER internetexplorer INTERNETEXPLORER googlechrome CHROME gc CHROME opera OPERA phantomjs PHANTOMJS htmlunit HTMLUNIT htmlunitwithjs HTMLUNITWITHJS android ANDROID iphone IPHONE safari SAFARI
+ ${dc name}= Get From Dictionary ${dc names} ${BROWSER.lower().replace(' ', '')}
+ ${caps}= Evaluate sys.modules['selenium.webdriver'].DesiredCapabilities.${dc name} selenium.webdriver,sys
+ ${url as str}= Evaluate str('${REMOTE_URL}') # cannot be unicode for several versions >= 2.32
+ ${kwargs}= Create Dictionary
+ Run Keyword If "${name}"=="Remote" Set To Dictionary ${kwargs} command_executor ${url as str} desired_capabilities ${caps}
+ Set Test Variable ${KWARGS} ${kwargs}

0 comments on commit c00bdac

Please sign in to comment.