phanhnt / SeleniumPractice

0 stars 0 forks source link

Textbox #6

Open phanhnt opened 9 months ago

phanhnt commented 9 months ago

For textbox, after locating the selector/xpath of elements, using the statement:

`Enter.theValue("{text_value}").into("{xpath}"),

For example:

@Test
    public void Textbbox() {

        PAnh.wasAbleTo(
                Open.url("https://demoqa.com/text-box"),
                Enter.theValue("Nguyen T Phuong Anh").into("//input[@id='userName']"),
                Enter.theValue("ntpanh9897@gmail.com").into("//input[@type='email']")

        );
    }

Test report:

image
phanhnt commented 9 months ago

When testcase opens browser, how to deal with this agreement dialog? this announcement prevents interactions with elements while compiling, leading to Test Failed

image