Open Cetale175 opened 10 months ago
Прошу проверить что за вебдрайвер у вас лежит по пути C:\Program Files\JMeter\bin\chromedriver.exe и удалить его, пусть селенид сам закачает необходимый для запуска автотестов.
Удалил chromedriver по пути, но проблема осталась такой же, а на данную версию google chrome, нельзя установить chromedriver, пока еще нет
Не вижу в шагах локального запуска учебного джарника, вы про данную операцию не забыли? Покажите весь лог, а не только его начало.
Task :compileJava NO-SOURCE Task :processResources NO-SOURCE Task :classes UP-TO-DATE Task :compileTestJava UP-TO-DATE Task :processTestResources NO-SOURCE Task :testClasses UP-TO-DATE Task :test [Test worker] INFO com.codeborne.selenide.impl.WebDriverThreadLocalContainer - No webdriver is bound to current thread: 1 - let's create a new webdriver [Test worker] INFO com.codeborne.selenide.impl.FileHelper - Creating folder: C:\Users\kiril\IdeaProjects\BDD\build\downloads\1704996424936_6620_1 [Test worker] INFO com.codeborne.selenide.webdriver.SelenideNettyClientFactory - Changed readTimeout from PT3M to PT1M30S [Test worker] INFO com.codeborne.selenide.webdriver.SelenideNettyClientFactory - Changed readTimeout from PT3M to PT1M30S янв. 11, 2024 9:07:06 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch WARNING: Unable to find CDP implementation matching 120 янв. 11, 2024 9:07:06 PM org.openqa.selenium.chromium.ChromiumDriver lambda$new$5 WARNING: Unable to find version of CDP to use for 120.0.6099.217. You may need to include a dependency on a specific version of the CDP using something similar to
org.seleniumhq.selenium:selenium-devtools-v86:4.11.0
where the version ("v86") matches the version of the chromium-based browser you're using and the version number of the artifact is the same as Selenium's. [Test worker] INFO com.codeborne.selenide.webdriver.WebDriverFactory - BrowserName=chrome Version=120.0.6099.217 Platform=windows [Test worker] INFO com.codeborne.selenide.webdriver.WebDriverFactory - Selenide v. 6.17.2 [Test worker] INFO com.codeborne.selenide.webdriver.WebDriverFactory - Selenium WebDriver v. 4.11.0 build revision: 040bc5406b [Test worker] INFO com.codeborne.selenide.drivercommands.CreateDriverCommand - Created webdriver in thread 1: ChromeDriver -> ChromeDriver: chrome on windows (cdca6b7983a41b0e9aca6a4534faccc4) [Test worker] INFO com.codeborne.selenide.drivercommands.DisposablesRegistry - Register WebDriverInstance[config=StaticConfig,webDriver=ChromeDriver: chrome on windows (cdca6b7983a41b0e9aca6a4534faccc4),proxy=null,downloadsFolder=C:\Users\kiril\IdeaProjects\BDD\build\downloads\1704996424936_6620_1] in 1 [size=1] [Test worker] INFO com.codeborne.selenide.drivercommands.DisposablesRegistry - Add shutdown hook in 1 [size=1]
Element not found {[data-test-id=code] input}
Expected: visible
Screenshot: file:/C:/Users/kiril/IdeaProjects/BDD/build/reports/tests/1704996431074.0.png
Page source: file:/C:/Users/kiril/IdeaProjects/BDD/build/reports/tests/1704996431074.0.html
Timeout: 4 s.
Caused by: NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"[data-test-id=code] input"}
Element not found {[data-test-id=code] input}
Expected: visible
Screenshot: file:/C:/Users/kiril/IdeaProjects/BDD/build/reports/tests/1704996431074.0.png
Page source: file:/C:/Users/kiril/IdeaProjects/BDD/build/reports/tests/1704996431074.0.html
Timeout: 4 s.
Caused by: NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"[data-test-id=code] input"}
at app//com.codeborne.selenide.impl.WebElementSource.createElementNotFoundError(WebElementSource.java:91)
at app//com.codeborne.selenide.impl.ElementFinder.createElementNotFoundError(ElementFinder.java:142)
at app//com.codeborne.selenide.impl.WebElementSource.handleError(WebElementSource.java:143)
at app//com.codeborne.selenide.impl.WebElementSource.checkConditionAndReturnElement(WebElementSource.java:127)
at app//com.codeborne.selenide.impl.WebElementSource.checkCondition(WebElementSource.java:104)
at app//com.codeborne.selenide.commands.Should.execute(Should.java:30)
at app//com.codeborne.selenide.commands.Should.execute(Should.java:14)
at app//com.codeborne.selenide.commands.Commands.execute(Commands.java:163)
at app//com.codeborne.selenide.impl.SelenideElementProxy.dispatchAndRetry(SelenideElementProxy.java:132)
at app//com.codeborne.selenide.impl.SelenideElementProxy.invoke(SelenideElementProxy.java:84)
at app//com.sun.proxy.$Proxy16.shouldBe(Unknown Source)
at app//ru.netology.web.page.VerificationPage.
Element not found {[data-test-id=code] input}
Expected: visible
Screenshot: file:/C:/Users/kiril/IdeaProjects/BDD/build/reports/tests/1704996435543.1.png
Page source: file:/C:/Users/kiril/IdeaProjects/BDD/build/reports/tests/1704996435543.1.html
Timeout: 4 s.
Caused by: NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"[data-test-id=code] input"}
Element not found {[data-test-id=code] input}
Expected: visible
Screenshot: file:/C:/Users/kiril/IdeaProjects/BDD/build/reports/tests/1704996435543.1.png
Page source: file:/C:/Users/kiril/IdeaProjects/BDD/build/reports/tests/1704996435543.1.html
Timeout: 4 s.
Caused by: NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"[data-test-id=code] input"}
at app//com.codeborne.selenide.impl.WebElementSource.createElementNotFoundError(WebElementSource.java:91)
at app//com.codeborne.selenide.impl.ElementFinder.createElementNotFoundError(ElementFinder.java:142)
at app//com.codeborne.selenide.impl.WebElementSource.handleError(WebElementSource.java:143)
at app//com.codeborne.selenide.impl.WebElementSource.checkConditionAndReturnElement(WebElementSource.java:127)
at app//com.codeborne.selenide.impl.WebElementSource.checkCondition(WebElementSource.java:104)
at app//com.codeborne.selenide.commands.Should.execute(Should.java:30)
at app//com.codeborne.selenide.commands.Should.execute(Should.java:14)
at app//com.codeborne.selenide.commands.Commands.execute(Commands.java:163)
at app//com.codeborne.selenide.impl.SelenideElementProxy.dispatchAndRetry(SelenideElementProxy.java:132)
at app//com.codeborne.selenide.impl.SelenideElementProxy.invoke(SelenideElementProxy.java:84)
at app//com.sun.proxy.$Proxy16.shouldBe(Unknown Source)
at app//ru.netology.web.page.VerificationPage.
MoneyTransferTest > shouldTransferFromFirstToSecond() FAILED com.codeborne.selenide.ex.ElementNotFound at MoneyTransferTest.java:24 Caused by: org.openqa.selenium.NoSuchElementException at MoneyTransferTest.java:24 MoneyTransferTest > shouldGetErrorMessageIfAmountMoreBalance() FAILED com.codeborne.selenide.ex.ElementNotFound at MoneyTransferTest.java:24 Caused by: org.openqa.selenium.NoSuchElementException at MoneyTransferTest.java:24 [Thread-6] INFO com.codeborne.selenide.drivercommands.DisposablesRegistry - Run cleanup: size=1 [Thread-6] INFO com.codeborne.selenide.impl.FileHelper - Deleted empty folder: C:\Users\kiril\IdeaProjects\BDD\build\downloads\1704996424936_6620_1 [Thread-6] INFO com.codeborne.selenide.drivercommands.CloseDriverCommand - Close webdriver: 31 -> ChromeDriver: chrome on windows (cdca6b7983a41b0e9aca6a4534faccc4)... [Thread-6] INFO com.codeborne.selenide.drivercommands.CloseDriverCommand - Closed webdriver 31 in 150 ms [Thread-6] INFO com.codeborne.selenide.drivercommands.DisposablesRegistry - Finished cleanup 2 tests completed, 2 failed
Task :test FAILED FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':test'. There were failing tests. See the report at: file:///C:/Users/kiril/IdeaProjects/BDD/build/reports/tests/test/index.html
- Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
- Get more help at https://help.gradle.org BUILD FAILED in 12s 2 actionable tasks: 1 executed, 1 up-to-date
Описание
При запуске тестов выдает ошибку : FAILURE: Build failed with an exception.
Шаги воспроизведения
1.Создал проект в IntelliJ IDEA Community Edition 2022.3.1 2.Добавил в него готовый файл .gitignore. 3.Добавьте в каталог artifacts целевой сервис (app-ibank-build-for-testers.jar). 4.Начал отслеживать файл (app-ibank-build-for-testers.jar) из папки artifacts. 6.Написал необходимые тесты. 7.Сделал пуш на удаленный репозиторий в Git Hub. 8.Выполнил интеграцию проекта с Appveyor. 9.Поставил бейджик сборки моего проекта в файл README.md.
Ожидаемый результат: Тесты запускаются. Проблем нет. Фактический результат: Тесты падают, выдают ошибку (FAILURE: Build failed with an exception.)
Логи
MoneyTransferTest > shouldTransferFromFirstToSecond() FAILED org.openqa.selenium.SessionNotCreatedException at MoneyTransferTest.java:22 1 test completed, 1 failed
Скриншот
Окружение