How can we capture run time values using selenium webdriver ?
For e.g while testing a banking site, we provide all details necessary to create a new customer and click submit. A customer ID is generated shown in the next page with the details of the customer listed in a tabular format (after successful new customer creation). How do we capture this ID ?
Any help appreciated
-
1Do you mean you just want to find the value on the page, so you can use it as a variable in your test method?FDM– FDM2014年11月18日 12:23:20 +00:00Commented Nov 18, 2014 at 12:23
1 Answer 1
If ID is shown on the page - it is shown as text in some element. Which has some locator. Find that element and get it's text or value property, as appropriate.