Hi guys, I need to test an internal WebSite using Fitnesse/Selenium. Most of the pages in the Website are written in JSF and I am not able to test even the Login Page.When the Login Page is loaded by Selenium, i cannot login even when i do it manually. Is there any problem? Can Fitnesse/Selenium test JSF pages? please help
It would help if you could describe why you cannot, for example, log in.
I have heard of JSF creating dynamic ID attribute values for the HTML elements it generates, which obviously screws up any test automation approach based on identifying elements by their IDs but, if this is the source of your problems, I've also heard that the Tomahawk extensions to MyFaces would allow you to use fixed IDs. I've never used that stuff myself, though, so it's just hear-say.
I'm having the same problem. When the login page (which is a JSP file) gets loaded, Selenium appears to open it, but just hangs. Trying to send further commands to that session on the command line results in:
INFO - Got result: ERROR: got a null result on session #####
In my python script, all commands after the "open" don't get executed, as the script hangs on the open command (even though it looks like the page gets fully loaded).
However, if I: 1) start selenium 2) open a new tab and point it the login page 3) login (a cookie gets saved so that new windows on the same session don't have to login) 4) tell selenium to go to the main page (which now bypasses the login page) 5) try to type stuff/test things
It works fine, as far as I can tell. But that isn't something I want to go through every time I try to run a test script. Anyone know of any Selenium/JSP errors that might be tripping the login page up? (Oddest thing is, other pages on the site use JSP, but selenium can load them just fine.)
Not sure if this is even the right place to be asking, so I thought I'd check. If you need more information, please ask.
Actually something else I noticed that seems odd is that when I normally open a page in Selenium, it opens the page in the bottom frame of the session. However, when it tries to open the login page, the selenium frames disappear, and it opens the login page in the entire window.
Joined: Jun 09, 2008
Just thought I'd post the solution I came across (well, it doesn't really solve anything, but it lets my tests run).
When I start my selenium server, I use the -multiWindow option, and this seems to avoid the issue. i.e.
Originally posted by Ben Blanchard: Actually something else I noticed that seems odd is that when I normally open a page in Selenium, it opens the page in the bottom frame of the session. However, when it tries to open the login page, the selenium frames disappear, and it opens the login page in the entire window.