我在小黃瓜獲取黃瓜,JVM步作爲字符串在Java中
Scenario: Correct login should take the user to the next screen
Given User is on the login screen
When User enters username as "Donald"
And User enters password as "Trump"
And User clicks the login button
Then User should be taken to the next screen
寫了下面的場景,我有以下步驟黃瓜JVM映射到這個場景
...
@Given("^User is on the login screen$)
public void goToLoginScreen(){
//some logic
}
如何在映射的步驟定義方法內獲取@Given
註釋之間的內容。我有幾個用例,這會有所幫助,但無法找出目前的情況。