Hi Team,
Could please help me to handle the cross button of the PopUp Window.
I am not able to get its exact xpath.
I tried with Accept Alert inbuilt keyword, but still not working.
Thanks in advance.
Hi Team,
Could please help me to handle the cross button of the PopUp Window.
I am not able to get its exact xpath.
I tried with Accept Alert inbuilt keyword, but still not working.
Thanks in advance.
In custom keywords you can used a TestObject with this xpath //div[@class=ângdialog-closeâ]
And next with this type of click
Actions action = new Actions(driver)
action.click(element).build().perform()
Rosary,
You want to select the
//div[@id='ngdialog2']/div[contains(@class,'ngdialog-content')]/div[contains(@class,'ngdialog-close')]
----
By the way, you wrote
the xpath of the objects having pseudo elements ::before or ::after
You are confused. The âpseudo elementâ is a terminology used in CSS selector. XPath specification does not define ::before and ::after.
In this forum comment, I typed this XPath expression:
//div[@id='ngdialog2']/div[@class='ngdialog-content']/div[@class='ngdialog-close']
This line is wrongly rendered by the Forum application as this:
//div[@id=ângdialog2â]/div[@class=ângdialog-contentâ]/div[@class=ângdialog-closeâ]
The Forum application has a bug. It consumes a character sequence class='xxxx-
away.
A workaround is to enclose the XPath in a pair of HTML code element: âŚ
<code>//div[@id='ngdialog2']/div[@class='ngdialog-content']/div[@class='ngdialog-close']</code>