How to use Selenium to store values between tests

前端 未结 2 2012
遥遥无期
遥遥无期 2021-01-05 23:25

Selenium has the ability to temporarily store data items and then later retrieve them in subsequent tests, e.g.

storeText | @id=\'ctl00_ContentPlaceHolder1_F         


        
2条回答
  •  时光取名叫无心
    2021-01-05 23:43

    You could also implement the persistence in the code that's running your Selenium tests. If you're using RC, this would be fairly trivial. (ie, just straight database queries to insert/update and then retrieve).

    If you're using Selenese and don't have access to an API for persistence, you could also whip up a quick and dirty little webpage to store the data in a database and then read it back for subsequent test runs. Obviously this isn't ideal, but it should work if you can't access a persistence store directly from your tests..

提交回复
热议问题