Forum Discussion
Thank you Alex;
As Robert advice me in his last message to record action and click on the pop up message, it does'nt work for me that give the same name mapping (The webpage object).
I try your idea to use FindChildEx and i perform the script bellow
function ConfirmerSuppProfile(){
var page = Sys.Browser().WaitPage("*");
var prop=["ObjectType","contentText","VisibleOnScreen","Enabled"];
var values = ["Panel","Profile 'CONSULTATION' supprimé","True","True"];
var depth = 5;
var popupmsg = page.FindChildEx(prop,values,depth,true,1000);
if(popupmsg.Exists)
Log.Message("Profile consultation supprimé");
else
Log.Error("The object was not found");
}
when i chage the page it give me the same result!! :(
Is it possible to use the generated source of the web page, and how i can process, because i don't find any think related to the pop up message
Thanks
Hi,
> when i chage the page it give me the same result!!
Not sure what is 'the same result' and what actual result is, but a quick note about this line of code:
> var values = ["Panel","Profile 'CONSULTATION' supprimé","True","True"];
The last two values relate to the "VisibleOnScreen" and "Enabled" properties both of which are boolean while your code provides strings.
I would change the line to
var values = ["Panel","Profile 'CONSULTATION' supprimé",True,True];
and check whether it will help.
- AssiaDerias9 years agoOccasional Contributor
Hi Alex and robert
I have found solution there is bellow:
function CheckSupprimerProfile()
{
//search panel of popup message
var popUpPanel=Sys.Browser("iexplore").Page("https://adm-idz-sys.intranet.mrn.gouv/fr/ProfileApplication/Index/IDZADMINTC").Panel("toast_container").Panel(0);
var mesDivs = popUpPanel.getElementsByClassName("toast-message");
var exists= false;
for (var i = 0; i < mesDivs.length; i++)
{
var message = mesDivs[i].getAttribute("aria-label");
if ( message == "Profile 'CONSULTATION' supprimé" ) {
exists = true;
}
}
if(exists){
//Compares the panelProfileConsultationSupprimer Stores item with the properties of the Aliases.browser.pageIdzadmintcProfil.pageCreerProfil.panelCreerProfil.panelModalContent object.
Objects.panelProfileConsultationSupprimer.Check(Aliases.browser.pageIdzadmintcProfil.pageCreerProfil.panelCreerProfil.panelModalContent);
Log.Message("profile Consultation supprimé avec succès");
}
}
I have introduce parameters of the message because this script i use it several times
Thank you in advance and for your professionalism
- AlexKaras9 years ago
Champion Level 1
Hi,
Good to know that the solution was found and thank you for the update here.