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
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.
!path
.class
import
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.
!path C:\fitnesse-for-appian-24.2.0\workspace\demo\target\classes
You need to give a path as per your directory structure.
I updated with import statement and it working now, but still having issue with "Could not find fixture: script"
Tried by giving class file path.
Tried with class file path & package name.
Tried with class file path , package name & class name.
Tried with class file path , package name , class name along with .java.
still having the "Could not find fixture: script" issue. Please find the below screenshot.
The compiled fixture java class must be in the classpath....