Skip to content

How to modify/update contents of tabular parameter in JBehave example table #15

@AmitRai22

Description

@AmitRai22

I need to modify content value of Example table of Scenario of JBehave story file through a Step-file(Java-method) will it be possible ?

eg.Story file

*Scenario* :Modifying_Example_Table

**Given** Previous values of example_table_row <Product_Sold>

**Given** Change the status of Product_Sold by Java method 


**Given** Print both previous and current status of Product_Sold

*Examples*:

|Product_Sold |

|"No"|

So can we update the value of Column Product_Sold by the step

"Given Change the status of Product_Sold by Java method"
as below

|Product_Sold |

|"Yes"| 

!--value of Product_Sold changed from "No" to "Yes" that I want by some code inside Step file

Step File :

@Given(Change the status of Product_Sold by Java method )
public void SomeJavaMethod()
{
//Some ExampleTable code to modify the value of  tabular parameter "Product_Sold"


}

so what should be the code inside above method in step file ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions