Greetings,
I've noticed that sometimes (not yet able to figure out exactly when) "DOM.getSearchResults" returns 0 as node id. For example in my sample html, there is a div with id "hello". I see following communication in my logs
{"id":1500,"sessionId":"98CFB1AB7DEA9C2E3037940D91095E9B","method":"DOM.performSearch","params":{"query":"#hello","includeUserAgentShadowDOM":true}}
{"id":1500,"result":{"searchId":"2164267.1","resultCount":1},"sessionId":"98CFB1AB7DEA9C2E3037940D91095E9B"}
{"id":1501,"sessionId":"98CFB1AB7DEA9C2E3037940D91095E9B","method":"DOM.getSearchResults","params":{"searchId":"2164267.1","fromIndex":0,"toIndex":1}}
{"id":1501,"result":{"nodeIds":[0]},"sessionId":"98CFB1AB7DEA9C2E3037940D91095E9B"}
I am trying to figure out when will I get 0 as node id. Based on
other events around same time frame, it looks like browser was
building the new document tree. Should I just ignore the result of
getSearchResults and try my query again or wait for some other
events are completed?
Regards,
Niranjan