c# - AutomationElement in flash -


i'm using automationelement-class find chat in flash application (bigbluebutton, http://demo.bigbluebutton.org, i'm testing there) in browser (firefox). seems work long no new messages appear. every time new message comes in, ui updates automationelement a) can't find chat or b) automationelement describes chat contains no messages. before new message arrives seems work. can access messages.

my code far:

    private void getlastchatmessage(){     system.diagnostics.process[] p = system.diagnostics.process.getprocessesbyname("firefox");     automationelement au = automationelement.fromhandle(p[0].mainwindowhandle);      propertycondition chatcond = new propertycondition(automationelement.nameproperty, "message box");     condition listcond = new propertycondition(automationelement.controltypeproperty, controltype.list);     andcondition listachatcond = new andcondition(listcond, chatcond);      automationelement chatarea = au.findfirst(treescope.descendants, listachatcond);     if (chatarea == null)     {         system.console.writeline("chatarea == null");         return;     }     system.console.writeline("name: {0}", chatarea.current.name);     propertycondition messagecond = new propertycondition(automationelement.isenabledproperty, true);     automationelementcollection chatmessages = chatarea.findall(treescope.children, messagecond);     if (chatmessages.count > 0)     {         string lastmessage = chatmessages[chatmessages.count - 1].current.name;         system.console.writeline("lastmessage: {0}", lastmessage);     }     else     {         system.console.writeline("chatmessages.count <= 0");     } } 

has idea how chat after ui update?

i tested ms inspect-tool (https://msdn.microsoft.com/en-us/library/windows/desktop/dd318521%28v=vs.85%29.aspx). if new chat message comes in , refresh tree didn't see new message. same happens if i'm testing internet explorer. if i'm collapsing whole tree of application , go again messages see new message. can't see whole tree after have collapsed tree. have restart browser. know how can new message whit program? how (and why) inspect-tool better results?

greetings


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -