2019-11-24 20:27:59 +00:00
|
|
|
package suites
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"testing"
|
2020-12-16 01:47:31 +00:00
|
|
|
|
2021-11-05 13:14:42 +00:00
|
|
|
"github.com/go-rod/rod"
|
2020-12-16 01:47:31 +00:00
|
|
|
"github.com/stretchr/testify/require"
|
2019-11-24 20:27:59 +00:00
|
|
|
)
|
|
|
|
|
2021-11-05 13:14:42 +00:00
|
|
|
func (rs *RodSession) doChangeMethod(t *testing.T, page *rod.Page, method string) {
|
|
|
|
err := rs.WaitElementLocatedByCSSSelector(t, page, "methods-button").Click("left")
|
2020-12-16 01:47:31 +00:00
|
|
|
require.NoError(t, err)
|
2021-11-05 13:14:42 +00:00
|
|
|
rs.WaitElementLocatedByCSSSelector(t, page, "methods-dialog")
|
|
|
|
err = rs.WaitElementLocatedByCSSSelector(t, page, fmt.Sprintf("%s-option", method)).Click("left")
|
2020-12-16 01:47:31 +00:00
|
|
|
require.NoError(t, err)
|
2019-11-24 20:27:59 +00:00
|
|
|
}
|