По логу видно, что хром открывается, но видимо не подгружает конечный url, локально все нормально
INFO: Creating folder: /home/vsts/work/1/s/build/downloads/1649404015857_1925_14
Apr 08, 2022 7:46:58 AM io.github.bonigarcia.wdm.WebDriverManager resolveDriverVersion
INFO: Using chromedriver 100.0.4896.60 (resolved driver for Chrome 100)
Apr 08, 2022 7:46:58 AM io.github.bonigarcia.wdm.WebDriverManager logSeekRepo
INFO: Reading https://chromedriver.storage.googleapis.com/ to seek chromedriver
Apr 08, 2022 7:46:58 AM io.github.bonigarcia.wdm.online.Downloader downloadAndExtract
INFO: Downloading https://chromedriver.storage.googleapis.com/100.0.4896.60/chromedriver_linux64.zip
Apr 08, 2022 7:46:59 AM io.github.bonigarcia.wdm.online.Downloader extract
INFO: Extracting driver from compressed file chromedriver_linux64.zip
Apr 08, 2022 7:46:59 AM io.github.bonigarcia.wdm.WebDriverManager exportDriver
INFO: Exporting webdriver.chrome.driver as /home/vsts/.cache/selenium/chromedriver/linux64/100.0.4896.60/chromedriver
Apr 08, 2022 7:46:59 AM com.codeborne.selenide.impl.FileHelper ensureFolderExists
INFO: Creating folder: /home/vsts/work/1/s/build/reports/tests
Apr 08, 2022 7:46:59 AM com.codeborne.selenide.webdriver.AbstractDriverFactory webdriverLog
INFO: Write webdriver logs to: /home/vsts/work/1/s/build/reports/tests/webdriver.1649404019418_1925_14.log
Starting ChromeDriver 100.0.4896.60 (6a5d10861ce8de5fce22564658033b43cb7de047-refs/branch-heads/4896@{#875}) on port 25650
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Apr 08, 2022 7:47:03 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
Apr 08, 2022 7:47:04 AM com.codeborne.selenide.webdriver.WebDriverFactory logBrowserVersion
INFO: BrowserName=chrome Version=100.0.4896.75 Platform=LINUX
Apr 08, 2022 7:47:04 AM com.codeborne.selenide.webdriver.WebDriverFactory createWebDriver
INFO: Selenide v. 5.14.2
Apr 08, 2022 7:47:04 AM com.codeborne.selenide.webdriver.WebDriverFactory logSeleniumInfo
INFO: Selenium WebDriver v. 3.141.59 build time: 2018-11-14T08:17:03
Apr 08, 2022 7:47:04 AM com.codeborne.selenide.drivercommands.CreateDriverCommand createDriver
INFO: Create webdriver in current thread 14: ChromeDriver -> ChromeDriver: chrome on LINUX (1ff549bac02b62c85255e124810f417c)
Given I am on portal home page # MainPageSteps.launchPortal()
java.lang.Error: Element not found {a[href*='/energy']}
Не использую chromedriverpath, драйвер подкачивается через селенид
Configuration.headless = true;
Configuration.screenshots = true;
Configuration.timeout = getPageElementLoadTimeoutMills();
Configuration.startMaximized = true;
Selenide.open(getBaseUrl());
yaml файл
trigger:
- main
pool:
vmImage: ubuntu-latest
steps:
- bash: |
nohup /usr/bin/google-chrome --disable-gpu --no-sandbox -headless --remote-debugging-port=9254 localhost > chrome.log 2>&1 &
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
goals: 'clean test'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
javaHomeOption: 'JDKVersion'
mavenVersionOption: 'Default'
mavenAuthenticateFeed: false
effectivePomSkip: false
sonarQubeRunAnalysis: false
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/TEST-*.xml'
- task: CopyFiles@2
inputs:
contents: '/home/vsts/work/1/s/build/reports/tests/*.png'
targetFolder: '$(build.artifactStagingDirectory)'
- task: PublishBuildArtifacts@1