开发者

Selenium Accessor not storing variable

I would like to store a value that's inside the inner HTML of a span tag of id="ctl00_body_BatchEditor_LblBatchIdentifyingNumber" with the Selenium IDE. And then I want to take that variable and use the "type" command to place that value inside of an input field.

(1) I'm having trouble with the commands for thi开发者_StackOverflows Test Case.

(2) I'd want to take this variable and use it in the same Test Case, and would also like to use it in a different Test Case. Is this possible?

Command to store variable:

Command: storeValue

Target: xpath=//span[@id='ctl00_body_BatchEditor_LblBatchIdentifyingNumber']

Value: batchId

Command to use the variable:

Command: type

Target: ctl00_body_QuickDataEntryEditor_TxtBatchId

Value: ${batchId}


Figured this one out. When I used the "storeText" Accessor command rather than the "storeValue" Accessor command, the variable got stored and it worked.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜