|
Rank: Newbie Groups: Member
Joined: 11/14/2019 Posts: 3
|
Hi i'm tryng to use your component to solve problems that have with others.
So, this is what i understood: - It's necessary working with javascript - I cant have reference object after executing script (all action need to be performed inside the script)
I usually work in two different steps -get html element -set its properties, ...click, ...etc now, if i understood correctly, i have to do both inside the script
But ther'are some situations where some action depending on different conditions that require working on htmlelement object, How would i solve a situation like this: - i get a htmlelement collection - i scan the collection - for every elements i check some conditions
var list=wb.getElementsByTag("DIV") foreach (var hel in list) { if (( hel.outerHtml.IndexOf("XXX")>=0 ) && ( mylist_saved_id.IndexOf(hel.id)<0 ) { hel.click() } }
Some actions need to be handled "after" recovering the html elements, but if i cannot have reference "after executing script" how would have to proceed?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi,
I do not understand what you meant by "some action need to be handled after recovering the HTML element". Specifically, which part of the source code you listed above can not be done in JavaScript?
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 11/14/2019 Posts: 3
|
Hi, clearly you can do it in java script, But prefer do not write all code in javascpipt for many reason. More reasonable would be (for me) to use simple javascript to simple action, get html element and after use the htmlelent in my environment c# where I can access to my library, services, etc etc and more important it would allow me to save my interface (so I can switch webbrowser control, winform wpf gechofx, witouth difference). Could you show me how to would write the example above? Would you write all in a javascript function?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi, You will need to do it in JavaScript. We do not have any plans to implement such features outside of JavaScript. This page explains the key benefits of doing it this way: https://www.essentialobjects.com/doc/webbrowser/advanced/jsdom.aspxWe do not write JavaScript code for our customers either. We consider this general Web programming topic so you will need write/debug such code yourself. Sorry about it. Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 11/14/2019 Posts: 3
|
Thank you that is what i wanted to be confirmed. I never wanted you write code for us, only understand how work your techonology in order to choose the most suitable product for us.
BS
|
|