BotPlay_Tranparent_BIG.png
BotPlay Automation
  • Codeless Automation

  • Features

  • Demo

  • Docs

    • BotPlay Tutorials
    • Community Forum
    • BotPlay Members
  • Learn Testing

    • Testing Basics
    • Advance Testing Skills
    • Automation Testing
    • Build Your QA brand
  • More

    Use tab to navigate through the menu items.
    Free Community edition
    To see this working, head to your live site.
    • Categories
    • All Posts
    • My Posts
    info
    Jul 12, 2021
      ·  Edited: Jul 27, 2021

    Parse Error due to badly formatted automation script

    in BotPlay Community Support

    Users getting below error on running BotPlay is due to badly formatted automation script .feature file.


    Please correct the format as per cucumber standard feature file format and bot will work as expected.


    C:\Users\*******\Documents\BotPlay\bot>java -cp .;.\bin\*;.\src\test\resources\* org.junit.runner.JUnitCore TestRunner

    JUnit version 4.13.2

    .E

    Time: 0.018

    There was 1 failure:

    1) initializationError(TestRunner)

    io.cucumber.core.gherkin.FeatureParserException: Failed to parse resource at: file:///C:/Users/codemantra/Documents/BotPlay/bot/./automation_scripts/Login/SampleFileUpload.feature

    (2:1): expected: #TagLine, #FeatureLine, #Comment, #Empty, got 'Scenario: File upload to Grammarly site.'

    (3:1): expected: #TagLine, #FeatureLine, #Comment, #Empty, got '* launch "https://www.grammarly.com/plagiarism-checker"'

    (4:1): expected: #TagLine, #FeatureLine, #Comment, #Empty, got '* upload file "Z:\apache-maven-3.8.1\README.txt" to "UD:Grammarly.FileUpload" element'

    (5:1): expected: #TagLine, #FeatureLine, #Comment, #Empty, got '* close browser'

    (6:0): unexpected end of file, expected: #TagLine, #FeatureLine, #Comment, #Empty

    at io.cucumber.core.gherkin.messages.GherkinMessagesFeatureParser.parse(GherkinMessagesFeatureParser.java:52)

    at io.cucumber.core.feature.FeatureParser.parseResource(FeatureParser.java:47)

    at java.base/java.util.function.BiFunction.lambda$andThen$0(BiFunction.java:70)

    at io.cucumber.core.resource.ResourceScanner.lambda$processResource$1(ResourceScanner.java:79)

    at io.cucumber.core.resource.PathScanner$ResourceFileVisitor.visitFile(PathScanner.java:75)

    at io.cucumber.core.resource.PathScanner$ResourceFileVisitor.visitFile(PathScanner.java:60)

    at java.base/java.nio.file.Files.walkFileTree(Files.java:2804)

    at io.cucumber.core.resource.PathScanner.findResourcesForPath(PathScanner.java:53)

    at io.cucumber.core.resource.PathScanner.findResourcesForUri(PathScanner.java:31)

    at io.cucumber.core.resource.ResourceScanner.findResourcesForUri(ResourceScanner.java:61)

    at io.cucumber.core.resource.ResourceScanner.scanForResourcesUri(ResourceScanner.java:134)

    at io.cucumber.core.runtime.FeaturePathFeatureSupplier.loadFeatures(FeaturePathFeatureSupplier.java:62)

    at io.cucumber.core.runtime.FeaturePathFeatureSupplier.get(FeaturePathFeatureSupplier.java:45)

    at io.cucumber.junit.Cucumber.<init>(Cucumber.java:158)


    FAILURES!!!

    Tests run: 1, Failures: 1



    C:\Users\*******\Documents\BotPlay\bot>echo "------Automation Stop-------"

    "------Automation Stop-------"


    C:\Users\*******\Documents\BotPlay\bot>pause

    Press any key to continue . . .

    0 comments
    0
    0 comments

    Get Started Today

    Free Community edition
    BotPlay_Tranparent_BIG.png
    LINKS