Loading ...
Sorry, an error occurred while loading the content.

Re: Fitlibrary, Fitnesse, Selenium in Java not working!!!

Expand Messages
  • pvlagsma
    Srivinas, Presumably you built your fixture using ThoughtWorks.Selenium.Core.dll . Try including the .DLL in your paths, not the .JAR . Works for me! As you
    Message 1 of 8 , Sep 30, 2006
    View Source
    • 0 Attachment
      Srivinas,

      Presumably you built your fixture using
      ThoughtWorks.Selenium.Core.dll .

      Try including the .DLL in your paths, not the .JAR .

      Works for me!

      As you see in the 'Assemblies searched:' list,
      fitnesse is not finding the .jar file.

      Paul

      --- In fitnesse@yahoogroups.com, "Srinivas Pavani" <scpavani@...>
      wrote:
      >
      > I am having a difficult time getting a simple test to work using
      > fitlibrary, fitnesse, and Selenium. I have seen the blog posts by
      > Jeremy Miller and Cory Foy but don't have a complete working
      example.
      >
      > I took Cory Foy's example on his blog and have the following as
      > fitnesse page:
      >
      > -----
      > !define COMMAND_PATTERN {%m %p}
      > !define TEST_RUNNER {dotnet\FitServer.exe}
      > !define PATH_SEPARATOR {;}
      >
      > !path dotnet\*.dll
      > !path lib\selenium-java-client-driver.jar
      > !path fitlibrary.jar
      > !path fitnesse.jar
      > !path c:\projects\fitTest\target

      *** The selenium path is DEFINED

      >
      > |!-SeleniumRunner-!|
      >
      > |Set server to|localhost|and port to|4444|and browser
      to|*firefox|and
      > domain to|http://www.google.com|
      >
      > |The user navigates to the URL|http://www.google.com|
      >
      > |The page has the title|Google|
      >
      > |The page has an element named|q|
      >
      > |The page has an element named|btnG|
      > -----
      >
      > The above setting give the following error:
      >
      > System.ApplicationException: Type 'seleniumrunner' could not be
      found
      > in assemblies.
      > Assemblies searched:
      file:///C:/fitnesse/dotnet/acceptanceTests.DLL
      > file:///C:/fitnesse/dotnet/eg.DLL
      > file:///C:/fitnesse/dotnet/fit.DLL
      > file:///C:/fitnesse/dotnet/FitLibrary.DLL

      *** the defined selenium path is NOT showing up in this list

      >
      > at fit.ObjectFactory.GetInstance(TypeName typeName, Assembly
      > assembly, Type type)
      > at fit.ObjectFactory.GetTypeOrInstance(TypeName typeName,
      > GetTypeOrInstanceDelegate getTypeOrInstance)
      > at fit.Fixture.LoadFixture(String className)
      > at fit.Fixture.DoTables(Parse tables)
      >
      > Changing the second line to:
      >
      > !define TEST_RUNNER {fitlibrary.suite.FitLibraryServer}
      >
      > produces the following error:
      >
      > java.io.IOException: CreateProcess:
      fitlibrary.suite.FitLibraryServer
      >
      C:\fitnesse\dotnet\acceptanceTests.dll;C:\fitnesse\dotnet\eg.dll;C:\fi
      tnesse\dotnet\fit.dll;C:\fitnesse\dotnet\FitLibrary.dll;lib\selenium-
      java-client-
      driver.jar;fitlibrary.jar;fitnesse.jar;c:\projects\fitTest\target
      > localhost 80 32 error=2
      > java.lang.ProcessImpl.create(Native Method)
      >
      > I also tried changing TEST_RUNNER to fit.FitServer but same error -
      > CreateProcess ...
      >
      > I am using the latest fitnesse (fitnesse20060719), fitlibrary
      > (20060906) and selenium-rc (0.8.1)
      >
      > I am curious to find out what others used to achieve their testing
      and
      > if they were able to continue testing in Java. Jerermy and Cory led
      me
      > to believe they were doing more .NET based testing.
      >
      > Should I revert back to older versions of fitnesse and fitlibrary?
      >
      > It has been a frustrating day without any progress. I thought this
      > would be the simple part!
      >
      > Thanks in advance for your help.
      >
    • Srinivas Pavani
      Paul and Chris, Thanks for your responses. I finally solved it and let me share my mistakes so that others may benefit from this. It may be obvious to others,
      Message 2 of 8 , Oct 1, 2006
      View Source
      • 0 Attachment
        Paul and Chris,

        Thanks for your responses. I finally solved it and let me share my
        mistakes so that others may benefit from this.

        It may be obvious to others, but I missed the first step of starting the
        the selenium server! Since I had developed the tests in Selenium IDE
        and they were working, I didn't think about the server part.


        Starting the Selenium server:
        *java -jar selenium-server.jar -port 4444*

        Then I was mixing the type of FIT server for the test.

        !define TEST_RUNNER {dotnet\FitServer.exe} -

        !define TEST_RUNNER {fitlibrary.suiteFixture.FibLibraryServer} - this is
        the version that ships with latest version of fitnesse

        !define TEST_RUNNER (fitlibrary.suite.FitLibraryServer) - this is the
        version that ships with the latest version of fitlibrary.jar

        The last line is what is needed for the latest version of fitlibrary.jar.


        On the root page for my subwiki, I entered these:

        !2 Classpath Settings
        !path c:\fitnesse\fitnesse.jar
        !path c:\fitnesse\fitlibrary.jar
        !path c:\fitnesse\lib\selenium-java-client-driver.jar
        !path c:\projects\myproject\target\

        !2 Collapse Setup and Tear Down sections
        !define COLLAPSE_SETUP {true}
        !define COLLAPSE_TEARDOWN {true}

        My SeleniumRunner is created in the default package. My test page
        contents are pasted below:

        |!- SeleniumRunner -!|

        | ''start browser '' | *firefox| ''pointing to server'' | localhost |
        ''on port'' | 4444 | ''with url'' | http://www.google.com |
        | ''open'' | / | ''url'' |
        | ''wait to load'' | 30000 |
        | ''page has title'' | Google |
        | ''type in field'' | q || yourgenie.com |
        | ''click on'' | btnG |
        | ''closeBrowser''|
        | ''stop'' |

        This works like a charm. Of course, now the real work begins...

        - Srinivas
      • Srinivas Pavani
        Can anyone give an example of how to get the fit.SummaryFixture working with FitLibraryServer? Thanks in advance for your help
        Message 3 of 8 , Oct 1, 2006
        View Source
        • 0 Attachment
          Can anyone give an example of how to get the fit.SummaryFixture working
          with FitLibraryServer?

          Thanks in advance for your help
        • yahoogroups@jhrothjr.com
          Use the summary built-in action. I think it s still there, but I haven t checked the code yet. ... use ... John Roth Python FIT ... From: Srinivas Pavani
          Message 4 of 8 , Oct 1, 2006
          View Source
          • 0 Attachment
            Use the summary built-in action.
            I think it's still there, but I haven't checked
            the code yet.

            That is, instead of:

            | fit.SummaryFixture |

            use

            | summary |

            John Roth
            Python FIT

            ----- Original Message -----
            From: "Srinivas Pavani" <scpavani.at.aim.com@...>
            To: "fitnesse@yahoogroups.com"
            <fitnesse.at.yahoogroups.com@...>
            Sent: Sunday, October 01, 2006 9:59 AM
            Subject: [fitnesse] Summary Fixture & FitLibraryServer


            > Can anyone give an example of how to get the fit.SummaryFixture working
            > with FitLibraryServer?
            >
            > Thanks in advance for your help
            >
          • Rick Mugridge
            In the latest (delta) version of Java FitLibrary, you ll need to add ... And in your fixturing code, have the method: public Object summary() { return new
            Message 5 of 8 , Oct 3, 2006
            View Source
            • 0 Attachment
              In the latest (delta) version of Java FitLibrary, you'll need to add your own action. Eg:

              |summary|

              And in your fixturing code, have the method:

              public Object summary() {
                return new SummaryFixture();
              }

              Cheers, Rick

              PS, I've had no complaints about the delta release, so consider it to be a full release.

              Srinivas Pavani wrote:

              Can anyone give an example of how to get the fit.SummaryFixture working
              with FitLibraryServer?

              Thanks in advance for your help

            • abhishek
              ... hi Srinivas. please could you provide the step by step process to get the above result,since i am very new to selenium and fitness.. thanks is
              Message 6 of 8 , Jun 5, 2012
              View Source
              • 0 Attachment
                --- In fitnesse@yahoogroups.com, Srinivas Pavani <scpavani@...> wrote:
                >
                > Paul and Chris,
                >
                > Thanks for your responses. I finally solved it and let me share my
                > mistakes so that others may benefit from this.
                >
                > It may be obvious to others, but I missed the first step of starting the
                > the selenium server! Since I had developed the tests in Selenium IDE
                > and they were working, I didn't think about the server part.
                >
                >
                > Starting the Selenium server:
                > *java -jar selenium-server.jar -port 4444*
                >
                > Then I was mixing the type of FIT server for the test.
                >
                > !define TEST_RUNNER {dotnet\FitServer.exe} -
                >
                > !define TEST_RUNNER {fitlibrary.suiteFixture.FibLibraryServer} - this is
                > the version that ships with latest version of fitnesse
                >
                > !define TEST_RUNNER (fitlibrary.suite.FitLibraryServer) - this is the
                > version that ships with the latest version of fitlibrary.jar
                >
                > The last line is what is needed for the latest version of fitlibrary.jar.
                >
                >
                > On the root page for my subwiki, I entered these:
                >
                > !2 Classpath Settings
                > !path c:\fitnesse\fitnesse.jar
                > !path c:\fitnesse\fitlibrary.jar
                > !path c:\fitnesse\lib\selenium-java-client-driver.jar
                > !path c:\projects\myproject\target\
                >
                > !2 Collapse Setup and Tear Down sections
                > !define COLLAPSE_SETUP {true}
                > !define COLLAPSE_TEARDOWN {true}
                >
                > My SeleniumRunner is created in the default package. My test page
                > contents are pasted below:
                >
                > |!- SeleniumRunner -!|
                >
                > | ''start browser '' | *firefox| ''pointing to server'' | localhost |
                > ''on port'' | 4444 | ''with url'' | http://www.google.com |
                > | ''open'' | / | ''url'' |
                > | ''wait to load'' | 30000 |
                > | ''page has title'' | Google |
                > | ''type in field'' | q || yourgenie.com |
                > | ''click on'' | btnG |
                > | ''closeBrowser''|
                > | ''stop'' |
                >
                > This works like a charm. Of course, now the real work begins...
                >
                > - Srinivas
                >


                hi Srinivas.
                please could you provide the step by step process to get the above result,since i am very new to selenium and fitness..
                thanks is advance,eagerly waiting for your reply
              Your message has been successfully submitted and would be delivered to recipients shortly.