Test on Windows 7

20 views
Skip to first unread message

Mitul Patel

unread,
Mar 31, 2011, 10:51:46 PM3/31/11
to Fitnium
Hi.
1) . I tried to running my test case on windows 7 Operating system.But
i got the javascript error.Did the Fitnium support window 7 OS. or
just only it work on XP???.

2). I am not able to uncheck the Check box.I tried the Fitnium api but
its not work for me.
Here is the scenario.
step 1 :- open the www.google.com
step 2 :- click the more menu[ next to the Gmail, Calendar, Documents,
Photos, Reader, Web, more]
step 3:- click on the photos link.( redirect to the Gmail Login page)
step 4:- enter username and password
step 5 :- uncheck the check box(By default it check)

here is my code
!define TEST_SYSTEM {slim}

!path fitnesse.jar
!path fitlibrary.jar
!path ./lib/*.jar

|import |
|fitnesse.slim.test |
|fitnesse.fixtures |
|com.magneticreason.fitnium|
|Suite |

|script |Base Fitnium
Fixture |
|the server is located at|
localhost |
|the server is on port |
4444 |
|using the browser |*iexplore |start at|
www.google.com|
|check |is selenium initialised|
true |
|set speed to |50 |
milliseconds |
|set timeout to |50000 |
milliseconds |
|write to debug |starting
test |

|script |Base Fitnium
Fixture |
|starting at URL
|/ |
|click Link |xpath=//html/body/div/div/div/div/ol/li[8]/
a/span[2]/span[2]|
|click Link |xpath=//
*[@id="gb_31"] |
|wait For Page To Load For|5 |
seconds |
|wait For Page To Load For|50 |
seconds |
|enter |username |in input field |xpath=//
input[@id='Email'] |
|enter |password |in input field |xpath=//
input[@id='Passwd'] |
|unclick check box |xpath=//*[!-
@id="PersistentCookieLabel"-!] |
|wait For |5 |
seconds |
|click button |
signIn |


Can you help on this...
Thank You,
Mitul

Keith Sterling

unread,
Apr 1, 2011, 1:07:18 AM4/1/11
to fit...@googlegroups.com
To reduce the complexity, see if change the line to

| unclick check box | id="PersistentCookieLabel" |

That will rule out if the Xpath is correct or not

Also before you do a click, try asserting that the element is present, this will throw an exception if the xpath, or id locator fails

K

> --
> You received this message because you are subscribed to the Google
> Groups "Fitnium" group.
> To post to this group, send email to fit...@googlegroups.com
> To unsubscribe from this group, send email to
> fitnium+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/fitnium?hl=en
>
> Fitnium is hosted at http://www.magneticreason.com/tools/fitnium/fitnium.html

Keith Sterling

unread,
Apr 1, 2011, 1:12:07 AM4/1/11
to Fitnium
Whoops, Ive seen what the problem is, your xpath is clicking the
label, not the check box

The label is called "PersistentCookieLabel"

But the check box is called "PersistentCookie

I see you are using ie, but its worth getting Firefox installed and
then install Firebug and use this for writing and debugging your
scripts

Firebug has an excellent set of tools for viewing the HTML source and
seeing ids etc of elements
Reply all
Reply to author
Forward
0 new messages