08-28-2016 08:03 AM
Hello,
I would like to press the tab on a web page tab that doesn´t have a direct URL. I read somewhere that ths could be achieved with the Navigate2 method in IWebBrowser2. Unfortunately I am not so good with HTML language. I have use Google Chromes Inspect function to try to get a comnmand to the web tab. See attachments. It is the "Line-ups" tab i want to press programmatically on.
Other possible solutions I have read about is with the click method on the web element but I have also failed trying that.
Any suggestions are apreciated. Thanks in advance.
08-29-2016 08:40 AM
Hello RealBjörkis,
Have you had a look at the example linked below? While it is not exactly what you are asking, I think it is onto something. Please review the property/invoke nodes used to interact with the HTML code.
https://decibel.ni.com/content/docs/DOC-25396
What was it that failed when using the click method? I would believe that to be a valid approach as well.
Best regards,
Christopher
08-29-2016 11:11 AM
Hello cbwestl,
Thanks for your tips.
Yes, I was initially looking at that example and I failed at the click method since Error 97 appeared:
"LabVIEW: a null or previously deleted refnum was passed in as an input"
See attachments with the VI that is a simplification from your link (https://decibel.ni.com/content/docs/DOC-25396). (I don´t need to input a text to a field). Other attachment is the error message.
Probably it doesn´t encounter any of the names (lineups or Line-ups) that i input to the name-input of IHTMLElementCollection. Could it be that this method is reserved for a button and not a Tab?
09-05-2016 02:02 AM
Hmm, I am not that experienced with the APIs you are using.
But the click method seems to be related to objects, so I cannot find any reason why it would not work for a tab.
You need to make sure that you are extracting the object reference correctly. The error you are seeing seems to be related to not having found the correct element.