Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
nico92
Posts : 5
Join date : 2012-05-22

wait for confirmation Empty wait for confirmation

Tue May 22, 2012 5:32 pm
Hello everyone

I need to automatise a test. The aim is to:
click on a button delete.
Then, a dialog confirmation yes/no appears. I need to click on the button yes.
I have tried WaitForConfirmation, but it doesn't work.
If I try to cklick on the button yes of the confirmation dialog, I do not get the error element not present, but it doesn't work either.

The tag of the dialog confirmation is a div with:

id="blueConfirmationDialog" class="dijitDialog" aria-labelledby="blueConfirmationDialog_title" role="dialog" title="" widgetid="blueConfirmationDialog" style="position: absolute; opacity: 1; left: 481px; top: 231px; z-index: 950;"

The tag of the button delete is a link with:
id="delete_relation_3" class="delete" urlaction="/instance/relation/delete/relation_id/3" urlconfirm="/instance/relation/get-delete-message/relation_id/3" onclick="" href="javascript:void(0);"

Could you help me?
rohit13
rohit13
Master
Master
Posts : 180
Join date : 2012-03-29
Age : 38
Location : INDIA
http://radical-qa.blogspot.in/

wait for confirmation Empty Re: wait for confirmation

Tue May 22, 2012 5:54 pm
What is happening when you click on OK of confirmation dialog?
Dialog is getting close or not??
avatar
nico92
Posts : 5
Join date : 2012-05-22

wait for confirmation Empty Re: wait for confirmation

Tue May 22, 2012 6:09 pm
If I click myself on the button yes, the confirmation dialog gets close.

But if I use the selenium command click to click on the button yes of the confirmation dialog, nothing happens.
rohit13
rohit13
Master
Master
Posts : 180
Join date : 2012-03-29
Age : 38
Location : INDIA
http://radical-qa.blogspot.in/

wait for confirmation Empty Re: wait for confirmation

Tue May 22, 2012 6:14 pm
Try to use xpath -
Code:
click or clickAt command with
//button[text()='Yes'] as target
avatar
nico92
Posts : 5
Join date : 2012-05-22

wait for confirmation Empty Re: wait for confirmation

Tue May 22, 2012 6:29 pm
It doesn't work with xpath. Selenium doesn't say that it hasn't found the element, but it doesn't work.
rohit13
rohit13
Master
Master
Posts : 180
Join date : 2012-03-29
Age : 38
Location : INDIA
http://radical-qa.blogspot.in/

wait for confirmation Empty Re: wait for confirmation

Tue May 22, 2012 6:40 pm
yes i got your problem..I was facing same issue earlier..
Have you tried clickAt command??
I have used same xpath when i was facing same issue.
avatar
nico92
Posts : 5
Join date : 2012-05-22

wait for confirmation Empty Re: wait for confirmation

Tue May 22, 2012 7:03 pm
ClickAt doesn't work either.

The problem perhaps comes from the fact that the dialog confirmation is in fact a dijit widget.
avatar
nico92
Posts : 5
Join date : 2012-05-22

wait for confirmation Empty Re: wait for confirmation

Fri Jun 29, 2012 3:15 pm
executing javascript to click on the button works:

driver.execute_script("(document.getElementById('dijit_form_Button_0_label')).click()")
Sponsored content

wait for confirmation Empty Re: wait for confirmation

Back to top
Permissions in this forum:
You cannot reply to topics in this forum