[JIRA] (JENKINS-53241) Jenkins couldn't find web element of maven project, however it is working on local eclipse

17 views
Skip to first unread message

sunyi891202@gmail.com (JIRA)

unread,
Aug 26, 2018, 9:15:02 PM8/26/18
to jenkinsc...@googlegroups.com
Jonny Sun created an issue
 
Jenkins / Story JENKINS-53241
Jenkins couldn't find web element of maven project, however it is working on local eclipse
Issue Type: Story Story
Assignee: Unassigned
Components: _unsorted
Created: 2018-08-27 01:14
Priority: Minor Minor
Reporter: Jonny Sun

Started by user Jonny Sun
Building in workspace C:\Program Files (x86)\Jenkins\workspace\qualit-maven
> C:\Program Files\Git\bin\git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> C:\Program Files\Git\bin\git.exe config remote.origin.url https://github.com/JonnySunNZ/qualit_selenium_maven.git # timeout=10
Fetching upstream changes from https://github.com/JonnySunNZ/qualit_selenium_maven.git
> C:\Program Files\Git\bin\git.exe --version # timeout=10
using GIT_ASKPASS to set credentials
> C:\Program Files\Git\bin\git.exe fetch --tags --progress https://github.com/JonnySunNZ/qualit_selenium_maven.git +refs/heads/:refs/remotes/origin/
> C:\Program Files\Git\bin\git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10
> C:\Program Files\Git\bin\git.exe rev-parse "refs/remotes/origin/origin/master^{commit}" # timeout=10
Checking out Revision 786615d6062adb0c96a387e0e101f1c34d497157 (refs/remotes/origin/master)
> C:\Program Files\Git\bin\git.exe config core.sparsecheckout # timeout=10
> C:\Program Files\Git\bin\git.exe checkout -f 786615d6062adb0c96a387e0e101f1c34d497157
Commit message: "Add files via upload"
> C:\Program Files\Git\bin\git.exe rev-list --no-walk 786615d6062adb0c96a387e0e101f1c34d497157 # timeout=10
Parsing POMs
Established TCP socket on 60839
[qualit-maven] $ "C:\Program Files\Java\jdk1.8.0_181/bin/java" -cp "C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven35-agent-1.12-alpha-1.jar;C:\apache-maven-3.5.4\boot\plexus-classworlds-2.5.2.jar;C:\apache-maven-3.5.4/conf/logging" jenkins.maven3.agent.Maven35Main C:\apache-maven-3.5.4 "C:\Program Files (x86)\Jenkins\war\WEB-INF\lib\remoting-3.21.1.jar" "C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven35-interceptor-1.12-alpha-1.jar" "C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.12-alpha-1.jar" 60839
<===[JENKINS REMOTING CAPACITY]===>���channel started
Executing Maven: -B -f C:\Program Files (x86)\Jenkins\workspace\qualit-maven\pom.xml test
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------< com.generictest.initial:initial >------------------
[INFO] Building initial 0.0.1-SNAPSHOT
[INFO] -------------------------------[ jar ]--------------------------------
[INFO]
[INFO] — maven-resources-plugin:2.7:resources (default-resources) @ initial —
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO]
[INFO] — maven-resources-plugin:2.7:copy-resources (copy-resources) @ initial —
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 5 resources
[INFO]
[INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ initial —
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] — maven-resources-plugin:2.7:testResources (default-testResources) @ initial —
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] — maven-compiler-plugin:3.1:testCompile (default-testCompile) @ initial —
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] — maven-surefire-plugin:2.22.0:test (default-test) @ initial —
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running TestSuite
Feature: Visit Qual IT website so that can perform search action

Scenario: search feature [90m# src/test/resources/features/Search.feature:3[0m
Starting ChromeDriver 2.41.578737 (49da6702b16031c40d63e5618de03a32ff6c197e) on port 39094
Only local connections are allowed.
Aug 27, 2018 12:58:37 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
[32mGiven [0m[32mI am in the qualit home page[0m [90m# QualitSmokeStepDefinition.i_am_in_the_qualit_home_page()[0m
[31mAnd [0m[31mI input search content[0m [90m# QualitSmokeStepDefinition.i_input_search_content()[0m
[31morg.openqa.selenium.TimeoutException: Expected condition failed: waiting for visibility of element located by By.cssSelector: #search (tried for 60 second(s) with 500 milliseconds interval)
Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:26:55.152Z'
System info: host: 'DESKTOP-O4BKEAT', ip: '10.192.17.47', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_181'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome:

{chromedriverVersion: 2.41.578737 (49da6702b16031..., userDataDir: C:\windows\TEMP\scoped_dir3...}

, cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions: {debuggerAddress: localhost:60855}, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 68.0.3440.106, webStorageEnabled: true}
Session ID: b7b5cf83dcd4025f2b93b9fb2eb51ef7
at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:81)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:271)
at common.BasePage.findByCss(BasePage.java:34)
at pageobjs.HomePage.clickSearchBtn(HomePage.java:17)
at stepdefinitions.QualitSmokeStepDefinition.i_input_search_content(QualitSmokeStepDefinition.java:50)
at ?.I input search content(src/test/resources/features/Search.feature:5)
[0m
[36mThen [0m[36mI should see search result[0m [90m# QualitSmokeStepDefinition.verify()[0m

[31mFailed scenarios:[0m
[31msrc/test/resources/features/Search.feature:3 [0m# search feature

1 Scenarios ([31m1 failed[0m)
3 Steps ([31m1 failed[0m, [36m1 skipped[0m, [32m1 passed[0m)
1m6.243s

org.openqa.selenium.TimeoutException: Expected condition failed: waiting for visibility of element located by By.cssSelector: #search (tried for 60 second(s) with 500 milliseconds interval)
Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:26:55.152Z'
System info: host: 'DESKTOP-O4BKEAT', ip: '10.192.17.47', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_181'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome:

{chromedriverVersion: 2.41.578737 (49da6702b16031..., userDataDir: C:\windows\TEMP\scoped_dir3...}

, cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions: {debuggerAddress: localhost:60855}, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 68.0.3440.106, webStorageEnabled: true}
Session ID: b7b5cf83dcd4025f2b93b9fb2eb51ef7
at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:81)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:271)
at common.BasePage.findByCss(BasePage.java:34)
at pageobjs.HomePage.clickSearchBtn(HomePage.java:17)
at stepdefinitions.QualitSmokeStepDefinition.i_input_search_content(QualitSmokeStepDefinition.java:50)
at ?.I input search content(src/test/resources/features/Search.feature:5)

[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 66.8 s <<< FAILURE! - in TestSuite
[ERROR] runScenario(testRunners.funcRun.SecCukesRunnerTest) Time elapsed: 66.24 s <<< FAILURE!
org.openqa.selenium.TimeoutException:
Expected condition failed: waiting for visibility of element located by By.cssSelector: #search (tried for 60 second(s) with 500 milliseconds interval)
Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:26:55.152Z'
System info: host: 'DESKTOP-O4BKEAT', ip: '10.192.17.47', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_181'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome:

{chromedriverVersion: 2.41.578737 (49da6702b16031..., userDataDir: C:\windows\TEMP\scoped_dir3...}

, cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions: {debuggerAddress: localhost:60855}, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 68.0.3440.106, webStorageEnabled: true}
Session ID: b7b5cf83dcd4025f2b93b9fb2eb51ef7

[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] SecCukesRunnerTest.runScenario � Timeout Expected condition failed: waiting fo...
[INFO]
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
[INFO]
[ERROR] There are test failures.

Please refer to C:\Program Files (x86)\Jenkins\workspace\qualit-maven\target\surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[JENKINS] Recording test results
[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.SurefireArchiver$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenArtifactArchiver$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenFingerprinter$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:10 min
[INFO] Finished at: 2018-08-27T12:59:42+12:00
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving C:\Program Files (x86)\Jenkins\workspace\qualit-maven\pom.xml to com.generictest.initial/initial/0.0.1-SNAPSHOT/initial-0.0.1-SNAPSHOT.pom
channel stopped
[qualit-maven] $ "C:\Program Files (x86)\Jenkins\tools\ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation\allure-2.7.0\bin\allure.bat" generate -c -o "C:\Program Files (x86)\Jenkins\workspace\qualit-maven\allure-report"
allure-results does not exists
Report successfully generated to C:\Program Files (x86)\Jenkins\workspace\qualit-maven\allure-report
Allure report was successfully generated.
Creating artifact for the build.
Artifact was added to the build.
Finished: UNSTABLE

 

 

 

I have tried locate element by Id, xpath and css selector and none of them worked.

 

also I maximize the browser to make sure element is showed on page by  BrowserDriver.getDriver().manage().window().maximize();

 

the test is working on local

 

this is my first time posting issues, if any format not approperiate, please forgive me and point out.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

sunyi891202@gmail.com (JIRA)

unread,
Aug 26, 2018, 9:22:03 PM8/26/18
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 19, 2020, 6:40:03 PM2/19/20
to jenkinsc...@googlegroups.com
Mark Waite closed an issue as Not A Defect
 

This is an issue in the user written test script or in the environment on the agent (sometimes because a web browser cannot be started on the agent to execute the test). Not a Jenkins issue.

Change By: Mark Waite
Status: Open Closed
Resolution: Not A Defect
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages