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

wait for confirmation

on 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?
avatar
rohit13
Master
Master
Posts : 180
Join date : 2012-03-29
Age : 31
Location : INDIA
http://radical-qa.blogspot.in/

Re: wait for confirmation

on Tue May 22, 2012 5:54 pm
What is happening when you click on OK of confirmation dialog?
Dialog is getting close or not??

_________________
Radical QA
http://radical-qa.blogspot.in/
nico92
Posts : 5
Join date : 2012-05-22

Re: wait for confirmation

on 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.
avatar
rohit13
Master
Master
Posts : 180
Join date : 2012-03-29
Age : 31
Location : INDIA
http://radical-qa.blogspot.in/

Re: wait for confirmation

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

_________________
Radical QA
http://radical-qa.blogspot.in/
nico92
Posts : 5
Join date : 2012-05-22

Re: wait for confirmation

on 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.
avatar
rohit13
Master
Master
Posts : 180
Join date : 2012-03-29
Age : 31
Location : INDIA
http://radical-qa.blogspot.in/

Re: wait for confirmation

on 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.

_________________
Radical QA
http://radical-qa.blogspot.in/
nico92
Posts : 5
Join date : 2012-05-22

Re: wait for confirmation

on 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.
nico92
Posts : 5
Join date : 2012-05-22

Re: wait for confirmation

on 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

Re: wait for confirmation

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