1

When i execute my script locally it works fine but, when i execute the same code via jenkins it says element not interactable.Is there any solution for this issue?

I already have explicit wait conditions in my script.

  • Can you save screen-shot for failed tests? It might help. Possible reasons: 1) the screen resolution is smaller and the control is outside the screen -> try to scroll to it. 2) page is not fully loaded, and there is some loadder is on foreground. – Sergii Dmytrenko Aug 14 '20 at 04:41
  • Since we have some issue with the reports, cannot save the screenshots when code is executed via jenkins, Might be your 2nd point is valid. What would be the best solution for this if it is because of loader? – Mohamed Zahid Aug 14 '20 at 05:59
  • Try to reproduce this locally to get locator for this spinner or loadder; write in code wait_for_element_is_shown and wait_for_element_is_gone. Please search how to do it in your programming language. – Sergii Dmytrenko Aug 14 '20 at 07:36
  • wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//div[@class='bigtix-calendar-dates__day-display-render']//div[1]"))) this always gives me error in jenkins, No idea why does it not wait in jenkins – Mohamed Zahid Aug 14 '20 at 09:51
  • When i use this below code to click a button it works in jenkins WebElement bookNow = driver.findElement(By.xpath("//button[contains(text(),'Book now')]")) JavascriptExecutor executor = (JavascriptExecutor) driver; executor.executeScript("arguments[0].click();", bookNow); But when i use a simple code such as driver.findElement(By.xpath("//button[text()='Book now' and @type='button']")).click() doesnot work in jenkins what does this mean? – Mohamed Zahid Aug 14 '20 at 09:51

0 Answers0