Forum Discussion

lindsaydpe's avatar
lindsaydpe
New Contributor
2 years ago

Cannot obtain the popup menu error

Hi everyone,

 

I have an error on a old project who were working fine. it's regarding the popup menu selection

 " Cannot obtain the popup menu "

but the variable passed exists and still works sometimes.

 

 

function rightClickDossierAndSelectOption(option){

let grid_incap_records = DossiersObjects.get_grid_incap_record();
aqUtils.Delay(10000);
child = grid_incap_records.FindChild("Id","1",100);

if (child.VisibleOnScreen && grid_incap_records.VisibleOnScreen){
child.ClickR();
aqUtils.Delay(10000);
grid_incap_records.PopupMenu.Click(option);

}

 

and the info passed with option is "Créer une feuille de renseignements". I've checked with a log.Message to control the option and it's ok.

I really dont know why it doesnt works sometimes..

I tried to modify the delay before the click, without delay or else..

 

Can you please help me?