2019-11-02 14:32:58 +00:00
|
|
|
package suites
|
|
|
|
|
2019-11-24 20:27:59 +00:00
|
|
|
import (
|
|
|
|
"testing"
|
2019-11-02 14:32:58 +00:00
|
|
|
|
2021-11-05 13:14:42 +00:00
|
|
|
"github.com/go-rod/rod"
|
|
|
|
"github.com/stretchr/testify/assert"
|
2019-11-24 20:27:59 +00:00
|
|
|
)
|
|
|
|
|
2021-11-05 13:14:42 +00:00
|
|
|
func (rs *RodSession) verifyBodyContains(t *testing.T, page *rod.Page, pattern string) {
|
2022-06-30 01:39:50 +00:00
|
|
|
body, err := page.ElementR("body", pattern)
|
2021-11-05 13:14:42 +00:00
|
|
|
assert.NoError(t, err)
|
|
|
|
assert.NotNil(t, body)
|
2019-11-02 14:32:58 +00:00
|
|
|
}
|