robotframework / SeleniumLibrary

Web testing library for Robot Framework
Apache License 2.0
1.36k stars 751 forks source link

flight booking with robot #1857

Closed sowjiterralogicc closed 9 months ago

sowjiterralogicc commented 9 months ago

Hi, This is my code for flight booking automation. Settings Library SeleniumLibrary

Test Cases Testsocialmedia Open Browser https://www.expedia.com/ chrome Maximize Browser Window sleep 5s Click Element xpath://a//span[text()='Flights'] sleep 2s Click Element xpath://a//span[text()='One-way'] sleep 10s Wait Until Element Is Visible xpath://div[@Class="uitk-field has-floatedLabel-label has-icon"]/button[@aria-label="Leaving from"] timeout=20s Input Text xpath://div[@Class="uitk-field has-floatedLabel-label has-icon"]/button[@aria-label="Leaving from"] Bangaluru sleep 5s

I am getting error like this Flight Booking Testsocialmedia DevTools listening on ws://127.0.0.1:58600/devtools/browser/0ae616ee-a325-44e9-8add-334043cfea9f Testsocialmedia | FAIL | InvalidElementStateException: Message: invalid element state (Session info: chrome=117.0.5938.132) Stacktrace: GetHandleVerifier [0x00007FF76AC07D12+55474] (No symbol) [0x00007FF76AB777C2] (No symbol) [0x00007FF76AA2DF9D] (No symbol) [0x00007FF76AA6732A] (No symbol) [0x00007FF76AA8F15A] (No symbol) [0x00007FF76AA656E6] (No symbol) [0x00007FF76AA8F370] (No symbol) [0x00007FF76AAA7EF2] (No symbol) [0x00007FF76AA8EF33] (No symbol) [0x00007FF76AA63D41] (No symbol) [0x00007FF76AA64F84] GetHandleVerifier [0x00007FF76AF6B762+3609346] GetHandleVerifier [0x00007FF76AFC1A80+3962400] GetHandleVerifier [0x00007FF76AFB9F0F+3930799] GetHandleVerifier [0x00007FF76ACA3CA6+694342] (No symbol) [0x00007FF76AB82218] (No symbol) [0x00007FF76AB7E484] (No symbol) [0x00007FF76AB7E5B2] (No symbol) [0x00007FF76AB6EE13] BaseThreadInitThunk [0x00007FF8E58E257D+29] RtlUserThreadStart [0x00007FF8E714AA68+40] Flight Booking | FAIL | 1 test, 0 passed, 1 failed can u solve this issue if possible

emanlove commented 9 months ago

A couple things .. it looks like you are trying to input text into a button (as per the xpath). which is invalid. It should be noted that the error exceptions with selenium are both explicit and descriptive such that they point you towards the issue and possible solutions. So in a case like this I would check the action that is throwing off the exception and based upon that exception make some assumptions as to possible resolutions. Again though you are trying to enter text into a button which will throw an error like this.

Second if you have access to the community channels, those are best for support questions like this one. Slack or the Forum are where most of the community resides and helps each other out. LinkedIn also works. But it is understandable if those are not an option for you. But in general we kindly ask that issue tickets are not used for support questions.

sowjiterralogicc commented 9 months ago

A couple things .. it looks like you are trying to input text into a button (as per the xpath). which is invalid. It should be noted that the error exceptions with selenium are both explicit and descriptive such that they point you towards the issue and possible solutions. So in a case like this I would check the action that is throwing off the exception and based upon that exception make some assumptions as to possible resolutions. Again though you are trying to enter text into a button which will throw an error like this.

Second if you have access to the community channels, those are best for support questions like this one. Slack or the Forum are where most of the community resides and helps each other out. LinkedIn also works. But it is understandable if those are not an option for you. But in general we kindly ask that issue tickets are not used for support questions.

Thanks problem has been resolved