Forum Discussion
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.
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 agoCommunity Hero
Hi,
Good to know that the solution was found and thank you for the update here.