Fitness and selenium intergration issue

I am trying to use the java selenium code into Fitnesse (fixture file intergration from Selenium), but observing that when we are running the Fitness test which we imported getting "could not find fixture : import" response.

Below are the steps we are performing:

Step 1:  Created user credentialls parameters and url functions in Fitness. 

Step 2: Verification - Just launching the webpage and passing the user credentialls, after that we are just verifying the tittle.

Step 3: All the validation we created in Selenium using two classes (first class created as fixture class and added all objects and parameters, same first class extended into second class where we just prformed login operations and verified page title)

Step4: Added all required Jar's into Selenium .

Step4: Added all required Jar's in Fitness test along with import method.

Step5: Running the Fitnesse test.

Step 6: After running the test getting "could not find fixture : import" response.

Note: We are just performing webpage launch and verify the field title.

Also placing the below snipet of the error message.

 

Script:

!define Test_SYSTEM{slim}

!path D:\FitNesse\FitNesse\src\main\java\demoImageIndexingPage
!path C:\Users\SA20314572\Downloads\selenium-java-3.6.0\client-combined-3.6.0.jar
!path C:\Users\SA20314572\Downloads\selenium-java-3.6.0\client-combined-3.6.0-sources.jar
!path C:\Users\SA20314572\.m2\repository\net\bytebuddy\byte-buddy\1.14.17\byte-buddy-1.14.17.jar
!path C:\Users\SA20314572\.m2\repository\org\apache\commons\commons-exec\1.3\commons-exec-1.3.jar
!path C:\Users\SA20314572\.m2\repository\com\google\guava\guava\19.0\guava-19.0.jar
!path C:\Users\SA20314572\.m2\repository\com\squareup\okhttp3\okhttp\3.0.0-RC1\okhttp-3.0.0-RC1
!path C:\Users\SA20314572\.m2\repository\com\squareup\okio\okio\1.0.0\okio-1.0.0

|import |
|ColumnFixture|
|DemoImageIndexingPage |
|urlGiven |openURL() |username |password |login() |
|wipro-uk-poc.appiancloud.com/.../image-indexing|URL Open - Success|sayed.ahmed4@wipro.com|Umbrella@100|Valid user|

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    Hi...

    To resolve the "Could not find fixture: import" error in FitNesse, ensure the !path is set to the directory containing the .class files of your Java code, not the source files. Also, check that your import statement correctly specifies the Java package name, matching the case and structure of your package directory.

  • I have added class file locations path and imported statements, still throwing  the same error message.

    can we have a small call for this issue please.

  • 0
    Certified Associate Developer
    in reply to sayeds3095
    You have not fixed the things mentioned in the previous message:
    - Correct package name (it is case-sensitive)
    |Import|
    |demoImageIndexingPage|
    - Replace the path with the generated class files path and point to the parent directory of the package. Still, you are pointing to the source code(.java files):
    Ex.
    I have the following directory structure:
    C:\fitnesse-for-appian-24.2.0\workspace\demo\target\classes\demo\DemoImageIndexingPage.class
    Hence, I need to give the following:

    !path C:\fitnesse-for-appian-24.2.0\workspace\demo\target\classes

    You need to give a path as per your directory structure.

Reply
  • 0
    Certified Associate Developer
    in reply to sayeds3095
    You have not fixed the things mentioned in the previous message:
    - Correct package name (it is case-sensitive)
    |Import|
    |demoImageIndexingPage|
    - Replace the path with the generated class files path and point to the parent directory of the package. Still, you are pointing to the source code(.java files):
    Ex.
    I have the following directory structure:
    C:\fitnesse-for-appian-24.2.0\workspace\demo\target\classes\demo\DemoImageIndexingPage.class
    Hence, I need to give the following:

    !path C:\fitnesse-for-appian-24.2.0\workspace\demo\target\classes

    You need to give a path as per your directory structure.

Children