Not navigating pagination3 and getting stale element exception - selenium

I need to navigate pages and check services on each page down or up, but while navigating page 3 is showing error message as stale element exception.
I have tried with this code but it's not working fine , someone please help me on this.
public class TC_2377154_12236_Verify_SRS_ServerStatus_LinuxServer {
public static void TC_2377154_12236() {
try {
Assert.done("Start -> TC_2377154_12236");
//BaseSetUp.openBrowser();
WebDriver driver = FrameworkDriver.driver;
driver.get("https://webtech.humana.com/nes/servicesview.aspx");
Assert.assertTrue(driver.findElement(By.xpath("//input[#id='tbLBVServerName']")).isDisplayed(), "LBV Server name is displayed");
driver.findElement(By.xpath("//input[#id='tbLBVServerName']")).sendKeys("SRS");
Assert.assertTrue(driver.findElement(By.xpath("//input[#id='btnFilter']")).isDisplayed(),"Filter button is displayed");
driver.findElement(By.xpath("//input[#id='btnFilter']")).click();
Assert.assertTrue(driver.findElement(By.xpath("//table[#id='dgServices']")).isDisplayed(),"Services name table is Displayed");
WebDriverWait wait = new WebDriverWait(driver, 20);
wait.until( ExpectedConditions.presenceOfElementLocated(
By.xpath("//a[#style='color:Black;']")));
List<WebElement> pagination = driver.findElements(By.xpath("//a[#style='color:Black;']"));
int s = pagination.size()/2;
System.out.println(s +"Pagination list");
for(int i=0;i<=s;i++){
List<WebElement> ls = driver
.findElements(By
.xpath("//font[#color='red']"));
System.out.println(ls.size()+"list of Down services size");
if (ls.size() > 1)
Assert.fail("All service states are expected Up and Running but there are "+(ls.size()+" servers are down"));
else if (ls.size() == 0)
Assert.fail("****Some technical issue or No Server is up or running****");
else if (ls.size() == 1)
Assert.pass("~~All Servers are Up and running~~");
Thread.sleep(5000);
// ls.get(i).click();
// Thread.sleep(5000);
System.out.println( pagination.get(i));
//driver.findElement(By.xpath("//a[#style='color:Black;']")).click();
pagination.get(i).click();
Thread.sleep(5000);
}
Assert.done("End -> TC_2377154_12236");
} catch (Exception e) {
Assert.error(e, "Error -> TC_2377154_12236");
}
}
}
I expected output as it should click on each and every page , but getting below error
TC_2377154_12236_Verify_SRS_ServerStatus_LinuxServer-TC_2377154_12236 : PASS - Filter button is displayed
TC_2377154_12236_Verify_SRS_ServerStatus_LinuxServer-TC_2377154_12236 : PASS - Services name table is Displayed
7Pagination list
5list of Down services size
TC_2377154_12236_Verify_SRS_ServerStatus_LinuxServer-TC_2377154_12236 : FAIL - All service states are expected Up and Running but there are 5 servers are down
[[ChromeDriver: chrome on XP (4f932cb86e8057b5ecda92c582500243)] -> xpath: //a[#style='color:Black;']]
TC_2377154_12236_Verify_SRS_ServerStatus_LinuxServer-TC_2377154_12236 : FAIL - Error -> TC_2377154_12236. Error:stale element reference: element is not attached to the page document
(Session info: chrome=77.0.3865.90)
(Driver info: chromedriver=2.37.544315 (730aa6a5fdba159ac9f4c1e8cbc59bf1b5ce12b7),platform=Windows NT 10.0.16299 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/stale_element_reference.html
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'
System info: host: 'WKR90LDWJ0', ip: '10.94.27.177', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_192'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.37.544315 (730aa6a5fdba15..., userDataDir: C:\Users\VAM1449\AppData\Lo...}, 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: 77.0.3865.90, webStorageEnabled: true}
Session ID: 4f932cb86e8057b5ecda92c582500243 Stack Trace: [Ljava.lang.StackTraceElement;#18d3f76
FAIL Error:stale element reference: element is not attached to the page document
(Session info: chrome=77.0.3865.90)
(Driver info: chromedriver=2.37.544315 (730aa6a5fdba159ac9f4c1e8cbc59bf1b5ce12b7),platform=Windows NT 10.0.16299 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/stale_element_reference.html
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'
System info: host: 'WKR90LDWJ0', ip: '10.94.27.177', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_192'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.37.544315 (730aa6a5fdba15..., userDataDir: C:\Users\VAM1449\AppData\Lo...}, 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: 77.0.3865.90, webStorageEnabled: true}
Session ID: 4f932cb86e8057b5ecda92c582500243 Stack Trace:
org.openqa.selenium.StaleElementReferenceException: stale element reference: element is not attached to the page document
(Session info: chrome=77.0.3865.90)
(Driver info: chromedriver=2.37.544315 (730aa6a5fdba159ac9f4c1e8cbc59bf1b5ce12b7),platform=Windows NT 10.0.16299 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/stale_element_reference.html
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'
System info: host: 'WKR90LDWJ0', ip: '10.94.27.177', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_192'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.37.544315 (730aa6a5fdba15..., userDataDir: C:\Users\VAM1449\AppData\Lo...}, 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: 77.0.3865.90, webStorageEnabled: true}
Session ID: 4f932cb86e8057b5ecda92c582500243
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:84)
at com.humana.hss.scripts.TC_2377154_12236_Verify_SRS_ServerStatus_LinuxServer.TC_2377154_12236(TC_2377154_12236_Verify_SRS_ServerStatus_LinuxServer.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.dell.acoe.framework.run.ExecutionThread.run(ExecutionThread.java:33)
Executing method [TC_2377154_12236]... completed
There is an issue while updating the script status to excel report. Please check file:null
Total:2
Passed:1 50%
Custom Report Generator is configured as:
TC_2377154_12236_Verify_SRS_ServerStatus_LinuxServer-TC_2377154_12236 : DONE - Custom Report Generator is configured as:
is not a valid CustomReportGenerator, it needs package.Class.method format and with two String args
TC_2377154_12236_Verify_SRS_ServerStatus_LinuxServer-TC_2377154_12236 : DONE - is not a valid CustomReportGenerator, it needs package.Class.method format and with two String args

Don't retrieve multiple elements out of For Loop.
You should find each element in For Loop again.
WebElement pag = diver.findElement(By.xpath("(//a[#style='color:Black;'])["+(i+1)+"]"));
Xpath example (you can search in web console):
(//a[#style='color:Black;'])[1]
List<WebElement> pagination = driver.findElements(By.xpath("//a[#style='color:Black;']"));
int s = pagination.size()/2;
System.out.println(s +"Pagination list");
for(int i=0;i<=s;i++){
// Add this line
WebElement pag = diver.findElement(By.xpath("(//a[#style='color:Black;'])["+(i+1)+"]"));
List<WebElement> ls = driver.findElements(By.xpath("//font[#color='red']"));
System.out.println(ls.size()+"list of Down services size");
if (ls.size() > 1)
Assert.fail("All service states are expected Up and Running but there are "+(ls.size()+" servers are down"));
else if (ls.size() == 0)
Assert.fail("****Some technical issue or No Server is up or running****");
else if (ls.size() == 1)
Assert.pass("~~All Servers are Up and running~~");
Thread.sleep(5000);
// ls.get(i).click();
// Thread.sleep(5000);
System.out.println( pagination.get(i));
//driver.findElement(By.xpath("//a[#style='color:Black;']")).click();
// Modify this line
pag.click();
Thread.sleep(5000);
}

Related

Selenium Checkbox cannot find - web driver Expected condition failed: waiting for visibility of element located by By.xpath:

I am trying to use selenium for headless browser to trigger some input but one of the checkbox in the page is not able to identify. I tried with waiting 100 seconds, and without waiting, but still having the same error that element cannot find.
Below is the code. I tried with ID and xPath, both having the same error. Also with visibilityOfElementLocated and elementToBeClickable but same error.
When I try the xpath in the chrome inspect element, it finds only one element. So I think xpath is correct.
val wait = WebDriverWait(driver, 30)
//wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[#name = 'element_ID']")))
wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//*[#name = 'element_ID']")))
val elem: WebElement = driver.findElement(By.xpath("//*[#id = 'element_ID']"))
elem.click()
Error
org.openqa.selenium.TimeoutException: Expected condition failed: waiting for element
to be clickable: By.xpath: //*[#name = 'element_ID'] (tried for 30 second(s) with 500 milliseconds interval)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'xxx', ip: 'xxx', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '12.4', java.version: '1.8.0_321'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.38.552518 (183d19265345f5..., userDataDir: /var/folders/06/072_bdvx0rs...}, cssSelectorsEnabled: true, databaseEnabled: false, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: MAC, platformName: MAC, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 103.0.5060.53, webStorageEnabled: true}
Session ID: 2d1c4aab1e9780033abcd6891537a5dsf

"TypeError: rootNode is null" happens when taking screenshots using Selenium framework

Why this error TypeError: rootNode is null happens when taking screenshots? Is there a problem in HTML DOM structure which the developer should fix or is it a problem with Selenium version?
This error is happening when taking screenshot:
org.openqa.selenium.WebDriverException: TypeError: rootNode is null
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'linuxhost', ip: 'x.x.x.x', os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-754.17.1.el6.x86_64', java.version: '1.8.0_202'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities {acceptInsecureCerts: true, browserName: firefox, browserVersion: 60.8.0, javascriptEnabled: true, moz:accessibilityChecks: false, moz:headless: false, moz:processID: 6651, moz:profile: /tmp/rust_mozprofile.LlBKoU..., moz:useNonSpecCompliantPointerOrigin: false, moz:webdriverClick: true, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, platformVersion: 2.6.32-754.17.1.el6.x86_64, rotatable: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}}
Session ID: 1afd06ed-4939-42c9-9d1d-51fa113dfe97
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:609)
at org.openqa.selenium.remote.RemoteWebDriver.getScreenshotAs(RemoteWebDriver.java:295)
dependency version:
Firefox: Mozilla Firefox 60.8.0
geckodriver: 0.23.0
selenium: 3.141.59
geb-spock:3.0.1
I just tried and it worked for me.
Firefox : 69.0 (64-bit)
Gecko Driver: v0.25.0
Webdriver: 3.141.59
FirefoxDriver fdriver;
System.setProperty("webdriver.gecko.driver", "/path/geckodriver");
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability("marionette", true);
FirefoxOptions foptions = new FirefoxOptions();
foptions.merge(capabilities);
fdriver = new FirefoxDriver(foptions);
fdriver.get("http://demo.guru99.com/selenium/guru99home/");
File src = ((TakesScreenshot) fdriver).getScreenshotAs(OutputType.FILE);
try {
// now copy the screenshot to desired location using copyFile //method
FileUtils.copyFile(src, new File("path/fchart.png"));
fdriver.quit();
}
catch (IOException e) {
System.out.println(e.getMessage());
}
I found out why "TypeError: rootNode is null" error is happening.
This error happens if test is trying to taking screenshot before even the html page source is completely downloaded.
Adding a dynamic wait to wait for page to load completely did fixed this issue.
waitFor {
((JavascriptExecutor)driver).executeScript("return document.readyState").equals("complete")
}
takeScreenshot()

Unable to click two continue SPAN buttons with Selenium WebDriver

I am trying to click two buttons with the following HTML Code
1.
<span translate="Resources.AddOns.TravelInsurance.Button_ContinueBooking" class="ng-scope">Continue Booking</span>
The Xpath = //*[#id="cont_to_ins"]/span
<button wn-validation-dom="prepaidcards-details" class="orange-btn btn btn-sm bold ng-scope" ng-if="!areOtherAddOnsAfterPrepaidCardsIndexAvailableInAccordion()" id="cont_to_ins" ng-click="continueBooking()"><span translate="Resources.AddOns.PrepaidCards.Button_ContinueBooking" class="ng-scope">Continue Booking</span> <i class="material-icons "></i></button>
The Xpath =
//*[#id="cont_to_ins"]
I have tried several codes but getting error that the button cannot be clicked .
Please kindly assist with the code to Find this element and click to move to next page
driver.findElement(By.xpath("//span[contains(text(), 'Continue Booking')])[1]/following::button[1]")).click();
log.debug("Click Continue ");
WebElement elementa= driver.findElement(By.xpath("//span[text()='Continue Booking']/"));
JavascriptExecutor executore = (JavascriptExecutor) driver;
executore.executeScript("arguments[0].click();", elementa);
org.openqa.selenium.InvalidSelectorException: invalid selector: Unable
to locate an element with the xpath expression //span[contains(text(),
'Continue Booking')])[1]/following::button[1] because of the following
error: SyntaxError: Failed to execute 'evaluate' on 'Document': The
string '//span[contains(text(), 'Continue
Booking')])[1]/following::button[1]' is not a valid XPath expression.
(Session info: chrome=74.0.3729.157) (Driver info:
chromedriver=74.0.3729.6
(255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729#{#29}),platform=Windows
NT 10.0.17763 x86_64) (WARNING: The server did not provide any
stacktrace information) Command duration or timeout: 0 milliseconds
For documentation on this error, please visit:
https://www.seleniumhq.org/exceptions/invalid_selector_exception.html
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'WN-HQ-LT-DEV-42', ip: '10.10.11.250', os.name:
'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version:
'1.8.0_211' Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false,
applicationCacheEnabled: false, browserConnectionEnabled: false,
browserName: chrome, chrome: {chromedriverVersion: 74.0.3729.6
(255758eccf3d24..., userDataDir: C:\Users\ADEYIN~1.ALA\AppDa...},
cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions:
{debuggerAddress: localhost:64341}, handlesAlerts: true,
hasTouchScreen: false, javascriptEnabled: true,
locationContextEnabled: true, mobileEmulationEnabled: false,
nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy:
normal, platform: XP, platformName: XP, proxy: Proxy(), rotatable:
false, setWindowRect: true, strictFileInteractability: false,
takesHeapSnapshot: true, takesScreenshot: true, timeouts: {implicit:
0, pageLoad: 300000, script: 30000}, unexpectedAlertBehaviour: ignore,
unhandledPromptBehavior: ignore, version: 74.0.3729.157,
webStorageEnabled: true} Session ID: aebe53b2f0ce483db0acf2034848ecd9
*** Element info: {Using=xpath, value=//span[contains(text(), 'Continue Booking')])[1]/following::button[1]}
Use WebdriverWait to handle dynamic element and following Xpath.
WebDriverWait wait = new WebDriverWait(driver, 30);
WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.xpath('//button[#id="cont_to_ins"]/span[contains(.,"Continue Booking")]')));
element.click()
You have not written proper XPath
driver.findElement(By.xpath("(//span[contains(text(), 'Continue Booking')])[1]/following::button[1]")).click();
log.debug("Click Continue ");

Getting "element not interactable" for below code

I am trying to click on few elements using below code on one webpage but it gives element is not interactable error. I also applied wait condition but it didn't help.
Here is my code:
driver.get("https://www.cleartrip.com/flights/results?from=BDQ&to=PNQ&depart_date=13/04/2019&adults=1&childs=0&infants=0&class=Economy&airline=&carrier=&intl=n&sd=1555000238907&stops=1&departureTime=0_8");
driver.findElement(By.xpath("//input[#value='1' and #name = 'stops']")).click();
driver.findElement(By.xpath("//input[#value='2' and #name = 'stops']")).click();
driver.findElement(By.xpath("//input[#value='0_8' and #name = 'departureTime']")).click();
error :
FAILED: testFlightSearch
org.openqa.selenium.ElementNotVisibleException: element not interactable
(Session info: chrome=73.0.3683.86)
(Driver info: chromedriver=73.0.3683.20 (8e2b610813e167eee3619ac4ce6e42e3ec622017),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: '3.141.0', revision: '2ecb7d9a', time: '2018-10-31T20:09:30'
System info: host: 'DESKTOP-B0K7HHH', ip: '192.168.43.195', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_161'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 73.0.3683.20 (8e2b610813e16..., userDataDir: C:\Users\shakti\AppData\Loc...}, cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions: {debuggerAddress: localhost:62726}, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, proxy: Proxy(), rotatable: false, setWindowRect: true, strictFileInteractability: false, takesHeapSnapshot: true, takesScreenshot: true, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unexpectedAlertBehaviour: ignore, unhandledPromptBehavior: ignore, version: 73.0.3683.86, webStorageEnabled: true}
Session ID: 8931562f8f37533e51073920887d83b0
The elements that you are trying the click are present on the page but are not clickable/interactable and that's the reason you are getting element not interactable exception.
You need to pick elements by using the xpath mentioned below and it would work:
driver.get("https://www.cleartrip.com/flights/results?from=BDQ&to=PNQ&depart_date=13/04/2019&adults=1&childs=0&infants=0&class=Economy&airline=&carrier=&intl=n&sd=1555000238907&stops=1&departureTime=0_8");
driver.findElement(By.xpath("//label[#for='1_1_1']")).click();
driver.findElement(By.xpath("//label[#for='1_1_2']")).click();
driver.findElement(By.xpath("//label[#for='1_1_0_8_departureTime']")).click();
The reason why you are getting org.openqa.selenium.ElementNotVisibleException is because when selenium goes to that URL, there is a progress bar on top of page which is still loading contents of the page. While it is loading, your code is searching for first element to click but it has not yet been loaded in the DOM.
You need to wait for the progress bar to complete loading before triggering the element click. The progress bar when loading has xpath: //p[#class='loadState tCenter' and contains(text(), 'Getting prices and availability...')] and after loading completely, the xpath to look for is //p[#class='loadState tCenter' and contains(text(), 'Your search results are ready.')].
Add a wait for element to appear for the 2nd xpath above and once it is visible, then trigger the element click.

Given xpath expression "//div[contains(#class='loader-overlay')]" is invalid with Selenium

After upgrading from version 2.53 to version 3.14 Selenium says
Given xpath expression "//div[contains(#class='loader-overlay')]" is invalid
This code
System.setProperty("webdriver.gecko.driver", "/path/to/geckodriver/v0.23.0");
FirefoxOptions options = new FirefoxOptions();
//...
driver = new FirefoxDriver(options);
WebElement loaderElement = driver.findElement(By.xpath("//div[contains(#class='loader-overlay')]"));
produces this error
org.openqa.selenium.InvalidSelectorException: Given xpath expression "//div[contains(#class='loader-overlay')]" is invalid: [Exception... "<no message>" nsresult: "0x8060000d (<unknown>)" location: "JS frame :: chrome://marionette/content/element.js :: element.findByXPath :: line 401" data: no]
For documentation on this error, please visit: http://seleniumhq.org/exceptions/invalid_selector_exception.html
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'xxx', ip: '10.233.112.79', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-116-generic', java.version: '1.8.0_181'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities {acceptInsecureCerts: true, browserName: firefox, browserVersion: 64.0, javascriptEnabled: true, moz:accessibilityChecks: false, moz:geckodriverVersion: 0.23.0, moz:headless: false, moz:processID: 2736, moz:profile: /tmp/rust_mozprofile.OP8KKQ..., moz:shutdownTimeout: 60000, moz:useNonSpecCompliantPointerOrigin: false, moz:webdriverClick: true, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, platformVersion: 4.4.0-116-generic, rotatable: false, setWindowRect: true, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify}
You need to replace
//div[contains(#class='loader-overlay')]
with
//div[contains(#class, 'loader-overlay')]
Note that you should use [#attr = "value"] syntax if you want to check if attribute value is exactly the "value", but contains syntax is [contains(#attr, "value")]
This error message...
org.openqa.selenium.InvalidSelectorException: Given xpath expression "//div[contains(#class='loader-overlay')]" is invalid: [Exception... "<no message>" nsresult: "0x8060000d (<unknown>)" location: "JS frame :: chrome://marionette/content/element.js :: element.findByXPath :: line 401" data: no]
For documentation on this error, please visit: http://seleniumhq.org/exceptions/invalid_selector_exception.html
...implies that that the xpath expression was not a valid one.
Solution
If the element is having a single class attribute as loader-overlay you need to change the xpath as:
"//div[#class='loader-overlay']"
If the element is having multiple class attributes and loader-overlay is one among them you need to change the xpath as:
"//div[contains(#class, 'loader-overlay')]"