i'm trying to use sahi to login to my gmail (using firefox) and
click on a registration link in an email as a party of my company's sahi
test case, but i'm getting the following errors:
ERROR
Step >_sahi._call(window.open("https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1<mpl=default<mplcache=2";), "gmailWindow");< did not complete in 150 seconds.
and
_popup("gmailWindow")._setValue(_textbox("Email"), "my_email_address@gmail.com");
Window/Domain not found: popupNameFromStep=gmailWindow; derivedName=; windowName=; windowTitle=; wasOpened=0; domain=
SOLUTION
1. click "firefox" in the sahi dashboard
2. click the link "SSL Manager"
3. copy each domain marked with a red dot, into a tab, prefixed by "https://", hit enter, accept security risk mumbo jumbo.
UPDATE 20130320: these are the domains that need to be accepted:
sahi.example.com
mail.google.com
ssl.google-analytics.com
accounts.google.com
sahi.example.com
accounts.youtube.com
gmail.com
4. go back to the default page: http://sahi.example.com/_s_/dyn/Driver_initialized (or close the ff window and reopen it) and open the sahi controller
5. choose my script, e.g. test_gmail_login.sah
my script code looks like this:
var $userMail = "my_email_address@gmail.com";
_setValue(_emailbox("Email"), $userMail);
_setValue(_password("Passwd"), _prompt("Enter gmail password:"));
_click(_submit("signIn"));
NOTE: the username field in gmail uses: _emailbox
NOT _textbox
6. set "https://gmail.com" as the "start url", click "set"
7. click "play"
so it DID seem to be an issue with SSL :)
---
NOTE:
this info is a repost from my original thread on the sahi forums, which i solved myself:
how to use sahi with gmail?
---
NOTE 2:
the sahi forum thread Problem with Automating gmail web page (HTTPS SSL certificate error)
suggests adding the following value:
xhr.wait_ready_states=2
at the end of the file:
sahi/userdata/config/userdata.properties
when using sahi in gmail. and the sahi documentation page troubleshooting sahi
suggests this value:
xhr.wait_ready_states=2,3
but in my case it seems to work without it.
---
NOTE 3:
sometimes when i first run the test, i get the following error message after logging into gmail:
Your browser's cookie functionality is turned off. Please turn it on.
all i have to do then is just click "set" in the sahi controller and run the test again and then it works.
No comments:
Post a Comment