Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/353.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 即使不存在错误,也可以使用执行日志获取电子邮件_Java_Log4j2_Smtpappender - Fatal编程技术网

Java 即使不存在错误,也可以使用执行日志获取电子邮件

Java 即使不存在错误,也可以使用执行日志获取电子邮件,java,log4j2,smtpappender,Java,Log4j2,Smtpappender,我的要求: 如果在执行过程中遇到错误,我需要发送一封包含错误日志以及以前日志级别>=INFO的日志的电子邮件。我当前的配置满足这个要求 如果执行过程中没有错误,我需要电子邮件在执行过程中记录所有消息,日志级别>=INFO。这里需要帮助。我当前的配置不满足此要求 我的maven项目中有以下log4j2 xml文件: <Configuration status="INFO"> <Properties> <Property na

我的要求:

  • 如果在执行过程中遇到错误,我需要发送一封包含错误日志以及以前日志级别>=INFO的日志的电子邮件。我当前的配置满足这个要求
  • 如果执行过程中没有错误,我需要电子邮件在执行过程中记录所有消息,日志级别>=INFO。这里需要帮助。我当前的配置不满足此要求
  • 我的maven项目中有以下log4j2 xml文件:

    <Configuration status="INFO">
        <Properties>
            <Property name="standardPattern">%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %m%n</Property>
            <Property name="mailSubject">Execution Log</Property>
            <Property name="recipients">xxxx@gmail.com</Property>
            <Property name="sender">xx@gmail.com</Property>
            <Property name="host">smtp.gmail.com</Property>
            <Property name="port">587</Property>
            <Property name="username">xx@gmail.com</Property>
            <Property name="protocol">smtp</Property>
            <Property name="password">secret</Property>
            <Property name="bufferSize">512</Property>
        </Properties>
        <Appenders>
            <Console name="Console" target="SYSTEM_OUT">
                <PatternLayout pattern="${standardPattern}" />
            </Console>
            <SMTP name="mailLog" subject="${mailSubject}" to="${recipients}"
                from="${sender}" smtpHost="${host}" smtpPort="${port}"
                smtpUsername="${username}" smtpPassword="${password}"
                buffersize="${bufferSize}" smtpProtocol="${protocol}"
                ignoreExceptions="false" smtpdebug="true">
                <PatternLayout pattern="${standardPattern}" />
                <ThresholdFilter level="error" onMatch="NEUTRAL"
                    onMismatch="DENY" />
            </SMTP>
            <Async name="asyncMail">
                <AppenderRef ref="mailLog" />
            </Async>
        </Appenders>
        <Loggers>
            <Root level="info">
                <AppenderRef ref="Console" />
            </Root>
            <Logger name="test" level="info" additivity="false">
                <AppenderRef ref="Console" />
                <AppenderRef ref="asyncMail"/>
            </Logger>
        </Loggers>
    </Configuration>
    
    正如所料,我收到了两封电子邮件,内容如下:

    第一封电子邮件(由于记录器的日志级别设置为info,跟踪和调试被忽略):

    第二封电子邮件:

    2020-07-23 03:18:31.790 [main] FATAL test - fatal
    
    到目前为止,一切正常

    问题:在执行以下代码时,我没有收到任何电子邮件(因为没有level=ERROR或FATAL的日志)

    在这种情况下,是否有可能收到一封包含以下内容的电子邮件?如果是,如何进行

    2020-07-23 03:18:31.780 [main] INFO  test - info
    2020-07-23 03:18:31.789 [main] WARN  test - warn
    
    已解决: 正如@RemkoPopma告诉我的,我必须决定电子邮件的触发器,以防在执行过程中没有错误。我分析了我的日志,并检查了每当执行完成而没有任何问题/错误时,我都会发送日志消息
    Suite execution completed
    。因此,请记住,我在结束时使用了SMTP附加器的复合过滤器,如下所示:

    <SMTP name="mailLog" subject="${mailSubject}" to="${recipients}"
    from="${sender}" smtpHost="${host}" smtpPort="${port}"
    smtpUsername="${username}" smtpPassword="${password}"
    buffersize="${bufferSize}" smtpProtocol="${protocol}"
    ignoreExceptions="false" smtpdebug="true">
        <PatternLayout pattern="${standardPattern}" />
        <Filters>
            <ThresholdFilter level="error" onMatch="ACCEPT"
             onMismatch="NEUTRAL" />
            <RegexFilter regex="^.*Suite execution completed.*$"
             onMatch="ACCEPT" onMisMatch="DENY" />
        </Filters>
    </SMTP>
    

    该配置有一个“触发”电子邮件发送的
    ThresholdFilter
    。如果收到级别错误的日志消息,则会发送电子邮件

    我不清楚OP想要什么作为替代触发器。 如果在收到级别为WARN的日志消息时应发送电子邮件,只需将筛选器重新配置为

    如果其他内容会触发电子邮件的发送(无论日志消息的级别如何),则可以配置另一个筛选器来查找日志消息的该方面。Log4j2有很多,其中任何一个都可以配置为触发发送电子邮件。如果这些都不符合您的要求,您可以


    因此,首先向自己澄清什么应该是触发器,然后配置或创建一个过滤器,该过滤器接受/不受此类日志事件的影响,并拒绝不符合触发器要求的日志事件。

    感谢您为我指明了正确的方向。这些链接很有帮助。我最终使用了复合过滤器,这两种过滤器现在都满足了我的要求。我将接受此答案,并将我的解决方案作为问题的编辑发布
    private static Logger log = LogManager.getLogger("test");
    log.trace("trace");
    log.debug("debug");
    log.info("info");
    log.warn("warn");
    
    2020-07-23 03:18:31.780 [main] INFO  test - info
    2020-07-23 03:18:31.789 [main] WARN  test - warn
    
    <SMTP name="mailLog" subject="${mailSubject}" to="${recipients}"
    from="${sender}" smtpHost="${host}" smtpPort="${port}"
    smtpUsername="${username}" smtpPassword="${password}"
    buffersize="${bufferSize}" smtpProtocol="${protocol}"
    ignoreExceptions="false" smtpdebug="true">
        <PatternLayout pattern="${standardPattern}" />
        <Filters>
            <ThresholdFilter level="error" onMatch="ACCEPT"
             onMismatch="NEUTRAL" />
            <RegexFilter regex="^.*Suite execution completed.*$"
             onMatch="ACCEPT" onMisMatch="DENY" />
        </Filters>
    </SMTP>
    
    2020-07-23 17:08:44.269 [main] INFO  Expedia - Suite execution started
    2020-07-23 17:08:44.283 [main] INFO  Expedia - Launching the "chrome" Browser
    2020-07-23 17:08:49.590 [main] INFO  Expedia - Maximizing browser window
    2020-07-23 17:08:51.865 [main] INFO  Expedia - Reading test data from the excel file at locaton - E:\Testing\WebTesting\WebTesting\src\test\resources\testData\oneWayFlight_checkEconomyClassResultsDefaultDate.xlsx
    2020-07-23 17:08:55.632 [main] INFO  Expedia - Deleting all the cookies
    2020-07-23 17:08:55.649 [main] INFO  Expedia - Navigating to URL - https://www.expedia.co.in/
    2020-07-23 17:09:06.845 [main] INFO  Expedia - |******************************************************************************************************************|
    2020-07-23 17:09:06.846 [main] INFO  Expedia - |!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!>>>>>>>>>>>>>>>>>STARTING TEST<<<<<<<<<<<<<<!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!|
    2020-07-23 17:09:06.847 [main] INFO  Expedia - |******************************************************************************************************************|
    2020-07-23 17:09:06.848 [main] INFO  Expedia - Starting Test execution for the test "oneWayFlight_checkEconomyClassResultsDefaultDate" with test data - {Leaving from=Mumbai, Going to=Chennai, Departure Date=29/12/20, Travel Class=Economy, Adults=2.0, Children=1.0, Infants=1.0}
    2020-07-23 17:09:07.281 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> xpath: //span[text()='Flights']]
    2020-07-23 17:09:08.131 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> xpath: //span[text()='One-way']]
    2020-07-23 17:09:12.832 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: [data-stid='location-field-leg1-origin-menu-trigger']]
    2020-07-23 17:09:13.663 [main] INFO  Expedia - Sending text "Mumbai" to the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> id: location-field-leg1-origin]
    2020-07-23 17:09:14.981 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> xpath: //strong[contains(text(),'Mumbai')]]
    2020-07-23 17:09:15.377 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: [data-stid='location-field-leg1-destination-menu-trigger']]
    2020-07-23 17:09:15.652 [main] INFO  Expedia - Sending text "Chennai" to the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> id: location-field-leg1-destination]
    2020-07-23 17:09:18.038 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> xpath: //strong[contains(text(),'Chennai')]]
    2020-07-23 17:09:18.758 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> id: d1-btn]
    2020-07-23 17:09:19.151 [main] INFO  Expedia - Scrolling the page to bring the object "[[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: div.uitk-new-date-picker]" in the visible area
    2020-07-23 17:09:20.778 [main] INFO  Expedia - The text "July 2020" was fetched from the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: div.uitk-new-date-picker-month:first-child h2]
    2020-07-23 17:09:20.850 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: button.uitk-button.uitk-button-small.uitk-flex-item.uitk-button-paging:last-child]
    2020-07-23 17:09:21.069 [main] INFO  Expedia - The text "August 2020" was fetched from the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: div.uitk-new-date-picker-month:first-child h2]
    2020-07-23 17:09:21.106 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: button.uitk-button.uitk-button-small.uitk-flex-item.uitk-button-paging:last-child]
    2020-07-23 17:09:21.279 [main] INFO  Expedia - The text "September 2020" was fetched from the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: div.uitk-new-date-picker-month:first-child h2]
    2020-07-23 17:09:21.318 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: button.uitk-button.uitk-button-small.uitk-flex-item.uitk-button-paging:last-child]
    2020-07-23 17:09:21.481 [main] INFO  Expedia - The text "October 2020" was fetched from the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: div.uitk-new-date-picker-month:first-child h2]
    2020-07-23 17:09:21.519 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: button.uitk-button.uitk-button-small.uitk-flex-item.uitk-button-paging:last-child]
    2020-07-23 17:09:21.796 [main] INFO  Expedia - The text "November 2020" was fetched from the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: div.uitk-new-date-picker-month:first-child h2]
    2020-07-23 17:09:21.935 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: button.uitk-button.uitk-button-small.uitk-flex-item.uitk-button-paging:last-child]
    2020-07-23 17:09:22.498 [main] INFO  Expedia - The text "December 2020" was fetched from the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: div.uitk-new-date-picker-month:first-child h2]
    2020-07-23 17:09:22.710 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> xpath: //div[@class='uitk-new-date-picker-month'][1]//button[@data-day='29']]
    2020-07-23 17:09:23.216 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: button[data-stid='apply-date-picker'] > span]
    2020-07-23 17:09:23.712 [main] INFO  Expedia - Scrolling to the page top in one-go
    2020-07-23 17:09:24.048 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> id: preferred-class-input-trigger]
    2020-07-23 17:09:24.634 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> xpath: //a[@class='uitk-list-item' and contains(text(),'Economy')]]
    2020-07-23 17:09:24.830 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: a[data-testid='travelers-field']]
    2020-07-23 17:09:25.240 [main] INFO  Expedia - The value of the attribute("value") is "1" for the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> id: adult-input-0]
    2020-07-23 17:09:25.304 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> xpath: //input[@id='adult-input-0']/following-sibling::button]
    2020-07-23 17:09:25.472 [main] INFO  Expedia - The value of the attribute("value") is "2" for the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> id: adult-input-0]
    2020-07-23 17:09:25.540 [main] INFO  Expedia - The value of the attribute("value") is "0" for the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> id: child-input-0]
    2020-07-23 17:09:25.607 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> xpath: //input[@id='child-input-0']/following-sibling::button]
    2020-07-23 17:09:25.847 [main] INFO  Expedia - The value of the attribute("value") is "1" for the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> id: child-input-0]
    2020-07-23 17:09:25.914 [main] INFO  Expedia - The value of the attribute("value") is "0" for the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> id: infant-input-0]
    2020-07-23 17:09:25.965 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> xpath: //input[@id='infant-input-0']/following-sibling::button]
    2020-07-23 17:09:26.360 [main] INFO  Expedia - The value of the attribute("value") is "1" for the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> id: infant-input-0]
    2020-07-23 17:09:26.437 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> xpath: //button[contains(text(),'Done')]]
    2020-07-23 17:09:26.908 [main] INFO  Expedia - Capturing screenshot of the visible area and saving at path - E:\Testing\WebTesting\WebTesting\screenshots\23-Jul-20\05.08 PM\oneWayFlight_checkEconomyClassResultsDefaultDate\Dataset1_SS1.jpg
    2020-07-23 17:09:28.413 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: button[data-testid='submit-button']]
    2020-07-23 17:09:43.180 [main] INFO  Expedia - The text "Tue, 29 Dec" was fetched from the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: th.depart-date.selected]
    2020-07-23 17:09:43.188 [main] INFO  Expedia - Highlighting the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: th.depart-date.selected]
    2020-07-23 17:09:43.298 [main] INFO  Expedia - Capturing screenshot of the visible area and saving at path - E:\Testing\WebTesting\WebTesting\screenshots\23-Jul-20\05.08 PM\oneWayFlight_checkEconomyClassResultsDefaultDate\Dataset1_SS2.jpg
    2020-07-23 17:09:43.900 [main] INFO  Expedia - oneWayFlight_checkEconomyClassResultsDefaultDate PASSED with parameters {Leaving from=Mumbai, Going to=Chennai, Departure Date=29/12/20, Travel Class=Economy, Adults=2.0, Children=1.0, Infants=1.0}
    2020-07-23 17:09:43.903 [main] INFO  Expedia - |******************************************************************************************************************|
    2020-07-23 17:09:43.904 [main] INFO  Expedia - |!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!>>>>>>>>>>>>>>>>>ENDING TEST<<<<<<<<<<<<<<<<!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!|
    2020-07-23 17:09:43.905 [main] INFO  Expedia - |******************************************************************************************************************|
    2020-07-23 17:09:43.907 [main] INFO  Expedia - Deleting all the cookies
    2020-07-23 17:09:57.603 [main] INFO  Expedia - Navigating to URL - https://www.expedia.co.in/
    2020-07-23 17:10:02.192 [main] INFO  Expedia - |******************************************************************************************************************|
    2020-07-23 17:10:02.194 [main] INFO  Expedia - |!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!>>>>>>>>>>>>>>>>>STARTING TEST<<<<<<<<<<<<<<!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!|
    2020-07-23 17:10:02.195 [main] INFO  Expedia - |******************************************************************************************************************|
    2020-07-23 17:10:02.197 [main] INFO  Expedia - Starting Test execution for the test "oneWayFlight_checkEconomyClassResultsDefaultDate" with test data - {Leaving from=Bengaluru, Going to=Delhi, Departure Date=17/8/20, Travel Class=Economy, Adults=3.0, Children=1.0, Infants=2.0}
    2020-07-23 17:10:02.677 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> xpath: //span[text()='Flights']]
    2020-07-23 17:10:05.273 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> xpath: //span[text()='One-way']]
    2020-07-23 17:10:06.514 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: [data-stid='location-field-leg1-origin-menu-trigger']]
    2020-07-23 17:10:07.198 [main] INFO  Expedia - Sending text "Bengaluru" to the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> id: location-field-leg1-origin]
    2020-07-23 17:10:08.986 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> xpath: //strong[contains(text(),'Bengaluru')]]
    2020-07-23 17:10:09.753 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: [data-stid='location-field-leg1-destination-menu-trigger']]
    2020-07-23 17:10:10.446 [main] INFO  Expedia - Sending text "Delhi" to the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> id: location-field-leg1-destination]
    2020-07-23 17:10:12.128 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> xpath: //strong[contains(text(),'Delhi')]]
    2020-07-23 17:10:12.400 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> id: d1-btn]
    2020-07-23 17:10:13.227 [main] INFO  Expedia - Scrolling the page to bring the object "[[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: div.uitk-new-date-picker]" in the visible area
    2020-07-23 17:10:14.637 [main] INFO  Expedia - The text "July 2020" was fetched from the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: div.uitk-new-date-picker-month:first-child h2]
    2020-07-23 17:10:14.675 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: button.uitk-button.uitk-button-small.uitk-flex-item.uitk-button-paging:last-child]
    2020-07-23 17:10:14.888 [main] INFO  Expedia - The text "August 2020" was fetched from the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: div.uitk-new-date-picker-month:first-child h2]
    2020-07-23 17:10:14.941 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> xpath: //div[@class='uitk-new-date-picker-month'][1]//button[@data-day='17']]
    2020-07-23 17:10:15.088 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: button[data-stid='apply-date-picker'] > span]
    2020-07-23 17:10:15.244 [main] INFO  Expedia - Scrolling to the page top in one-go
    2020-07-23 17:10:15.331 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> id: preferred-class-input-trigger]
    2020-07-23 17:10:16.080 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> xpath: //a[@class='uitk-list-item' and contains(text(),'Economy')]]
    2020-07-23 17:10:16.246 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: a[data-testid='travelers-field']]
    2020-07-23 17:10:17.200 [main] INFO  Expedia - The value of the attribute("value") is "1" for the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> id: adult-input-0]
    2020-07-23 17:10:17.238 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> xpath: //input[@id='adult-input-0']/following-sibling::button]
    2020-07-23 17:10:17.381 [main] INFO  Expedia - The value of the attribute("value") is "2" for the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> id: adult-input-0]
    2020-07-23 17:10:17.420 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> xpath: //input[@id='adult-input-0']/following-sibling::button]
    2020-07-23 17:10:17.493 [main] INFO  Expedia - The value of the attribute("value") is "3" for the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> id: adult-input-0]
    2020-07-23 17:10:17.544 [main] INFO  Expedia - The value of the attribute("value") is "0" for the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> id: child-input-0]
    2020-07-23 17:10:17.680 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> xpath: //input[@id='child-input-0']/following-sibling::button]
    2020-07-23 17:10:17.928 [main] INFO  Expedia - The value of the attribute("value") is "1" for the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> id: child-input-0]
    2020-07-23 17:10:17.983 [main] INFO  Expedia - The value of the attribute("value") is "0" for the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> id: infant-input-0]
    2020-07-23 17:10:18.048 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> xpath: //input[@id='infant-input-0']/following-sibling::button]
    2020-07-23 17:10:18.190 [main] INFO  Expedia - The value of the attribute("value") is "1" for the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> id: infant-input-0]
    2020-07-23 17:10:18.240 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> xpath: //input[@id='infant-input-0']/following-sibling::button]
    2020-07-23 17:10:18.329 [main] INFO  Expedia - The value of the attribute("value") is "2" for the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> id: infant-input-0]
    2020-07-23 17:10:18.375 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> xpath: //button[contains(text(),'Done')]]
    2020-07-23 17:10:18.749 [main] INFO  Expedia - Capturing screenshot of the visible area and saving at path - E:\Testing\WebTesting\WebTesting\screenshots\23-Jul-20\05.08 PM\oneWayFlight_checkEconomyClassResultsDefaultDate\Dataset2_SS1.jpg
    2020-07-23 17:10:19.549 [main] INFO  Expedia - Clicking on the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: button[data-testid='submit-button']]
    2020-07-23 17:10:24.950 [main] INFO  Expedia - The text "Mon, 17 Aug" was fetched from the object [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: th.depart-date.selected]
    2020-07-23 17:10:24.954 [main] INFO  Expedia - Highlighting the object - [[ChromeDriver: chrome on WINDOWS (e6d90b3b9c443edc5ce4b7226f26c405)] -> css selector: th.depart-date.selected]
    2020-07-23 17:10:25.147 [main] INFO  Expedia - Capturing screenshot of the visible area and saving at path - E:\Testing\WebTesting\WebTesting\screenshots\23-Jul-20\05.08 PM\oneWayFlight_checkEconomyClassResultsDefaultDate\Dataset2_SS2.jpg
    2020-07-23 17:10:30.422 [main] INFO  Expedia - oneWayFlight_checkEconomyClassResultsDefaultDate PASSED with parameters {Leaving from=Bengaluru, Going to=Delhi, Departure Date=17/8/20, Travel Class=Economy, Adults=3.0, Children=1.0, Infants=2.0}
    2020-07-23 17:10:30.423 [main] INFO  Expedia - |******************************************************************************************************************|
    2020-07-23 17:10:30.423 [main] INFO  Expedia - |!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!>>>>>>>>>>>>>>>>>ENDING TEST<<<<<<<<<<<<<<<<!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!|
    2020-07-23 17:10:30.424 [main] INFO  Expedia - |******************************************************************************************************************|
    2020-07-23 17:10:30.488 [main] INFO  Expedia - Closing all the windows/tabs opened by the WebDriver
    2020-07-23 17:10:31.598 [main] INFO  Expedia - Suite execution completed