How to close login pop up message in Selenium Webdriver

0 votes

I am a beginner in learning Selenium and I am stuck at an issue.

I was trying to automate the make my trip website and right after opening the website using get() method, I am getting a login pop up.

Please help me to understand as to how do I close the pop up? Screenshot attached:

URL used:

Jun 24, 2020 in Selenium by Mayank
• 120 points
Create a login account and try automating it.. or else use alerts to close the pop up

4 answers to this question.

0 votes

Assuming it to be a simple pop-up that appears when you are entering the page and it is present in main window itself. Use the below code to close it.

driver.find_element_by_xpath('//div[contains(@class,"ui-dialog") and @aria-describedby="dialogContent2"]//button[@title="Close"]').click()
answered Jun 24, 2020 by Sirajul
• 59,090 points
0 votes

PlZ use this element and click it

//p[contains(text(),’Login or Create Account’)] 

it will move focus from pop up

answered Jun 25, 2020 by Pavan Andi
0 votes

use this command

answered Jun 30, 2020 by Purushottam Rockks
0 votes
did you find solution for this?
answered Nov 5, 2020 by anonymous

reshown Nov 5, 2020 by Sirajul
Hey, Have you tried the solutions mentioned above?
Yes, but it's not working. can you please send me code. I am struggling it for whole day
Hey, what's the error you are getting?

Related Questions In Selenium

0 votes
1 answer

How to handle Pop-up in Selenium WebDriver using Java

Actually, its pretty simple. Use this code ...READ MORE

answered Apr 6, 2018 in Selenium by nsv999
• 5,500 points
0 votes
2 answers

How to scroll the Page up or down in Selenium WebDriver? (using java)

JavascriptExecutor jsx = (JavascriptExecutor)driver; jsx.executeScript("window.scrollBy(0,555)", ""); or Action classes ...READ MORE

answered Sep 6, 2020 in Selenium by Sri
• 3,190 points
+10 votes
17 answers

How to automate gmail login process using selenium webdriver in java?

Check the below code: Here is the working ...READ MORE

answered Apr 24, 2018 in Selenium by Vardy
• 2,360 points
0 votes
2 answers
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,890 points
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
+2 votes
1 answer

C Sharp with Selenium -- How to Switch one tab to another tab in Csharp selenium

You could use Session.Driver.WindowHandles which is basically to switch ...READ MORE

answered Dec 23, 2019 in Selenium by Sirajul
• 59,090 points
+3 votes
1 answer

How to read excel file numeric data of all rows and column in selenium? I have 10 rows and 5 column but I read Only String value not a Numeric value?

Hey, @Mahendra, check this thread It deals with ...READ MORE

answered Jan 27, 2020 in Selenium by Sirajul
• 59,090 points