LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to press Tab in Web Page with help of IWebBrowser2

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.

Download All
0 Kudos
Message 1 of 4
(4,583 Views)

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

0 Kudos
Message 2 of 4
(4,513 Views)

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?

0 Kudos
Message 3 of 4
(4,504 Views)

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.

 

 

0 Kudos
Message 4 of 4
(4,435 Views)