From 4850e3f3873a6d8e4cef318aa71add0320494a87 Mon Sep 17 00:00:00 2001 From: Ben Adida Date: Mon, 14 Feb 2011 22:25:53 -0800 Subject: [PATCH] added first selenium test --- selenium/create-election-and-vote | 242 ++++++++++++++++++++++++++++++ 1 file changed, 242 insertions(+) create mode 100644 selenium/create-election-and-vote diff --git a/selenium/create-election-and-vote b/selenium/create-election-and-vote new file mode 100644 index 000000000..b72d6c924 --- /dev/null +++ b/selenium/create-election-and-vote @@ -0,0 +1,242 @@ + + + + + + +create-election-and-vote + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
create-election-and-vote
open/helios/autologin
open/
clickAndWaitlink=create election >
typeid_short_nametest1
typeid_nametest1
typeid_descriptiontest1
clickAndWaitnext_button
clickAndWaitlink=voters & ballots
clickAndWaitlink=switch to open
clickAndWaitlink=back to election
clickAndWaitlink=questions (0)
waitForElementPresentanswer_table
typequestionw?
typeanswer_1a
typeanswer_2b
typeanswer_3c
click//input[@value='add question']
clickAndWaitlink=back to election
clickAndWaitlink=freeze ballot and open election.
waitForElementPresent//input[@value='freeze!']
clickAndWait//input[@value='freeze!']
clickAndWaitlink=Vote in this election
waitForElementPresent//button[@onclick='BOOTH.show_question(0);']
click//button[@onclick='BOOTH.show_question(0);']
clickanswer_0_0
click//input[@value='Proceed']
click//button[@onclick='BOOTH.seal_ballot();']
waitForElementPresentproceed_button
clickAndWaitproceed_button
waitForElementPresent//button[@type='submit']
clickAndWait//button[@type='submit']
waitForElementPresentlink=return to election info
clickAndWaitlink=return to election info
open/helios/autologin
open/helios/e/test1
clickAndWaitlink=compute encrypted tally
waitForElementPresent//input[@value='compute encrypted tally!']
click//input[@value='compute encrypted tally!']
assertAlertok, tally has begun
waitForElementPresentlink=combine trustee decryptions and release results
clickAndWaitlink=combine trustee decryptions and release results
waitForElementPresentid_body
typeid_bodytest
clickAndWaitsend_button
assertTextPresentThis election is complete.
+ +