# Waitforelement failed when running chrome headless

**URL:** <https://forum.katalon.com/t/waitforelement-failed-when-running-chrome-headless/39269>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [January 30, 2020, 4:16pm UTC](https://forum.katalon.com/t/waitforelement-failed-when-running-chrome-headless/39269 "2020-01-30T16:16:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vtanguturi](https://avatars.discourse-cdn.com/v4/letter/v/ce73a5/32.png) [@vtanguturi](https://forum.katalon.com/u/vtanguturi)\
**Post date:** [January 30, 2020, 4:16pm UTC](https://forum.katalon.com/t/waitforelement-failed-when-running-chrome-headless/39269/1 "2020-01-30T16:16:57Z")

</div>

Hi,  
When I run a script on chrome headless the any waitForElement methods are not waiting until its passed and my actions after the wait are failing. If I run the same script with chrome then its working fine no errors.  
I tried all wait methods that WebUI has and also used Explicit Expected conditions waituntil methods but no luck.

TestObject menuObj = CustomKeywords.‘ciautils.ciaUtilities.makeTOwithXPath’(’//div[contains(@class, ‘navigation-wrapper’)]//li[contains(@class, ‘navigation-menu-item’)] /a’)

WebUI.waitForElementHasAttribute(menuObj, “href”, 20)

Browser config:  
browser = Chrome 79.0.3945.130  
platform = Windows 10  
seleniumVersion = 3.141.59

I need to make sure the script runs with no issues on headless so that I can use this script in jenkins to run.
