Я в настоящее время изучает Webdriver. У меня есть задача домашнего задания, чтобы написать тест в журнале для этого сайта https://practicesoftwaretesting.com/auth/login in -hate-bear режим для Chrome, Firefox и Edge.
Шаги -следующие ...
Scenario: User logs out successfully
Given the user is on the login page
And the user enters email "customer2@practicesoftwaretesting.com"
And the user enters password "welcome01"
And the user clicks the Login button
When the user clicks the user menu
And the user clicks the logout button
Then the user redirected to the login page
< /code>
Вот мой код в файле Spec < /p>
import { expect, browser, $ } from '@wdio/globals'
describe('My Login application', () => {
it('User logs in and logs out successfully', async () => {
await browser.url('https://practicesoftwaretesting.com/auth/login')
// LOGIN STEPS
await $('[id="email"]').setValue('customer2@practicesoftwaretesting.com');
await $('[id="password"]').setValue('welcome01');
await $('[value="Login"]').click();
// LOGOUT STEPS
await $('//*[@id="menu"]').click();
await $('//*[@id="menu"]').waitForDisplayed();
await $('/html/body/app-root/app-header/nav/div/div/ul/li[4]/ul/li[7]/a').click();
await expect(browser).toHaveUrl('https://practicesoftwaretesting.com/auth/login');
})
})
< /code>
Шаги для входа работают, но я застрял на шагах входа в Chrome, потому что кнопка входа находится в раскрывающемся меню. Я получаю следующее сообщение об ошибке. < /P>
webdriverio(middleware): element did not become interactable in "My Login application.User logs in and logs out successfully"
webdriverio(middleware): element did not become interactable: Element [url=#]Jack Howe[/url] did not become interactable
Я в настоящее время изучает Webdriver. У меня есть задача домашнего задания, чтобы написать тест в журнале для этого сайта https://practicesoftwaretesting.com/auth/login in -hate-bear режим для Chrome, Firefox и Edge. Шаги -следующие ... [code]Scenario: User logs out successfully Given the user is on the login page And the user enters email "customer2@practicesoftwaretesting.com" And the user enters password "welcome01" And the user clicks the Login button When the user clicks the user menu And the user clicks the logout button Then the user redirected to the login page < /code> Вот мой код в файле Spec < /p> import { expect, browser, $ } from '@wdio/globals'
describe('My Login application', () => {
it('User logs in and logs out successfully', async () => {
}) < /code> Шаги для входа работают, но я застрял на шагах входа в Chrome, потому что кнопка входа находится в раскрывающемся меню. Я получаю следующее сообщение об ошибке. < /P> webdriverio(middleware): element did not become interactable in "My Login application.User logs in and logs out successfully" webdriverio(middleware): element did not become interactable: Element [url=#]Jack Howe[/url] did not become interactable [/code] Есть ли какое -либо решение для этого?>