checking messagebox in siesta
Posted: Tue Jan 28, 2020 4:04 pm
Hi all,
I have started the testing journey recently. Mainly, I am focusing on UI tests for now.
I have implemented a method to test crud actions for a webapp(implemented in extjs) with more than 600 screens. Things look smooth till now. However, I am facing some tiny issues and I would need your guidance.
Sometimes, when it happens to delete a record, there is always a messagebox alert.
I use recorder to get dom elements which are in two forms:
1.
2.
The solution I am applying now is to use a condition based on screen name in order to perform a chain action.
example:
My question is: is there any way to check the visibility of messagebox so that if it exists, the pointer could click Yes/OK and continue
Here is the image of the messagebox:
Thanks
I have started the testing journey recently. Mainly, I am focusing on UI tests for now.
I have implemented a method to test crud actions for a webapp(implemented in extjs) with more than 600 screens. Things look smooth till now. However, I am facing some tiny issues and I would need your guidance.
Sometimes, when it happens to delete a record, there is always a messagebox alert.
I use recorder to get dom elements which are in two forms:
1.
{waitForCQ: "#myAppName-messgbox title[text=Do you want to delete this record\?]"},
{click: "messagebox[title=Do you want to delete this record\?]#myAppName-messgbox #yes => .x-btn-inner-default-small"},
{waitForCQ: '#myAppName-messgbox title[text=Do you want to delete this record\?]'},
{click: '#myAppName-messgbox #yes => .x-btn-button'}
example:
delAction.it("is clicking trash icon", function(del){
if(screenName === 'employee'){ // there are more screens to be added to this condition
del.chain(
waitForCQ: '#myAppName-messgbox title[text=Do you want to delete this record\?]'},
{click: "messagebox[title=Do you want to delete this record\?]#myAppName-messgbox #yes => .x-btn-inner-default-small"'}
)
}else{
del.chain({waitForCQ: '#myAppName-messgbox title[text=Do you want to delete this record\?]'},
{click: '#myAppName-messgbox #yes => .x-btn-button'})
}
})
Here is the image of the messagebox:
Thanks