How to Parametrize dynamic css values?

Hello All,

I have a dynamic value changing on a css selector. In my testobject repository, i put this css in “Selected Locator” → “app-subheader ul.subheader li.selected:nth-child(${stepValue})”. stepValue is a variable set from my gherkin step like this :

	@Then("I am on the step {int} of the adding contract workflow test")
	def checkWorkflowStep_test(int stepValue){
		boolean present = WebUI.waitForElementPresent(findTestObject('WEB/PageUploadPDF/WorkflowSteps/step1', ['nth_child' : stepValue]), 10)
		if (present==false){
			throw new StepFailedException("web element not found")
		}
	}

I try to set the value stepValue in the property nth_child but it is not working.
I think this is the wrong property to change?

Thank you in advance for your help

MTO