Using Selenium: how to use output from one test as an input to another test

I'm Selenium n00b ... it clearly shows how easy it is to run the test and check for a specific answer, but how can I take the value from one answer and use it in the next test?

an example would be a contact creation form ...

  • enter your name / email address and click Submit
  • the answer comes with a new ContactID
  • take the ContactID that was returned and put it in the get text box and hit send
  • the answer comes with contact details
  • verfy name / email address matches the first set

How can I do this in Selenium?

+3
source share
2

- :

, "", . , , .

, selenium ide: "store..." selenium ide . ContactID , storeText. :

command: storeText
target: selector for element containing contactId
value: contactId

, .

command: type
target: selector for target input box
value: ${contactId}

, :)

+5

( - , , "" " ". , . .)

. . . , .

, , , , .

: . .

+3

Source: https://habr.com/ru/post/1750722/