Unable to close on pop up while opening makemy trip homepage | Selenium Forum
M
Posted on 27/10/2015
Hi,

While opening "http://www.makemytrip.com/" through selenium I am getting one pop up window which has "X" link to close.But while taking the x-path of "X" link I am seeing everytime div[] number is getting changed.So x path is not working out.I even tried with other properties.But it is not working.Is there any generic code for closing the pop-ups.Attaching the file screenshot and also the link structure.

M
Replied on 27/10/2015

this xpath seems stable. try it.

//*[@id="htmlDoc"]/body/div[12]/div/a


M
Replied on 27/10/2015

yah looks like it is stable now...but is there any other generic ways to close these kind of pop-up


M
Replied on 27/10/2015

no, you have to press "cross"