You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
query ="""INSERT INTO myTable(the_id,the_value,the_url)
632
-
VALUES (%(the_id)s,%(the_value)s,%(the_url)s)"""
633
-
db.execute_query(query, {"the_id":the_id,
634
-
"the_value":the_value,
635
-
"the_url":the_url})
636
-
```
637
-
638
-
Access credentials are stored in [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py) for your convenience (you have to add them first).
639
-
640
-
The following example below (taken from the Divided Test Data Manager) shows how data can be pulled from the database.
641
-
642
-
```python
643
-
import logging
644
-
from seleniumbase.core.mysql import DatabaseManager
Divided Test usage example: If you scheduled an email to go out 3 hours from now and you wanted to check that the email gets received (but you don't want your test sitting idle for 3 hours) you can store the email credentials as a unique time-stamp for the email subject in the DB (along with a time for when it's safe for the email to be searched for) and then a later-running test can do the checking after the right amount of time has passed.
0 commit comments