Marek Melocik said:
List eleCount = driver.findElements(By.xpath("//li[@listitem lazyload-item ']//h2")) 
Thanks for the quick response. but not it is giving some other error. I’m fed up with this matter
please help on this. 
Error :
07-27-2018 09:39:31 PM - [ERROR] - invalid selector: Unable to locate an element with the xpath expression //li[@listitem lazyload-item ']//h2 because of the following error:
SyntaxError: Failed to execute ‘evaluate’ on ‘Document’: The string '//li[@listitem lazyload-item ‘]//h2’ is not a valid XPath expression.
(Session info: chrome=67.0.3396.99)
(Driver info: chromedriver=2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/invalid_selector_exception.html
Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’
System info: host: ‘CSISL_SUDAM’, ip: ‘100.67.15.46’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_102’
Driver info: com.kms.katalon.selenium.driver.CChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.35.528161 (5b82f2d2aae0ca…, userDataDir: C:\Users\Dell\AppData\Local…}, cssSelectorsEnabled: true, databaseEnabled: false, 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: 67.0.3396.99, webStorageEnabled: true}
Session ID: e9d5506a33292ea6e11d623d5b1c6762
*** Element info: {Using=xpath, value=//li[@listitem lazyload-item ']//h2}
07-27-2018 09:39:31 PM - [END] - End action : helper.searchKeyWords.searchKeyWord
07-27-2018 09:39:31 PM - [ERROR] - Test Cases/tc_SearchKeyWord FAILED because (of) org.openqa.selenium.InvalidSelectorException: invalid selector: Unable to locate an element with the xpath expression //li[@listitem lazyload-item ']//h2 because of the following error:
SyntaxError: Failed to execute ‘evaluate’ on ‘Document’: The string '//li[@listitem lazyload-item ‘]//h2’ is not a valid XPath expression.
(Session info: chrome=67.0.3396.99)
(Driver info: chromedriver=2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/invalid_selector_exception.html
Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’
System info: host: ‘CSISL_SUDAM’, ip: ‘100.67.15.46’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_102’
Driver info: com.kms.katalon.selenium.driver.CChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.35.528161 (5b82f2d2aae0ca…, userDataDir: C:\Users\Dell\AppData\Local…}, cssSelectorsEnabled: true, databaseEnabled: false, 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: 67.0.3396.99, webStorageEnabled: true}
Session ID: e9d5506a33292ea6e11d623d5b1c6762
*** Element info: {Using=xpath, value=//li[@listitem lazyload-item ']//h2}