Forum Discussion
4 Replies
- tristaanogreEsteemed Contributor
I'm assuming you're not using NameMapping to identify your objects? The reason I say that is that using NameMapping you can identify the panels by other things (like className, Caption, etc) rather than just the object identifier which won't be subject to the variability that you're noticing.
Or, you could incorporate "FindChild" methodology in your automation so that, rather than using the long string, you'd do something like
var page = Sys.Browser("chrome").Page("*") var form = page.Form("*") var firstPanel = form.FindChild(['ObjectType','className'], ['Panel', 'TitleDiv'], 1) var secondPanel = firstPanel.FindChild(['ObjectType','className'],['Panel','HeaderDiv'], 1)
As far as I know, the Panel identifiers you can't (and shouldn't) wildcard since that could confuse a number of things. I'd strongly recommend "FindChild" for your object identification if you're not going to use NameMapping. Those you can more easily wildcard or build out better identification logic.
- MathitContributor
Thank you.
- MathitContributor
set page1 = Sys.Browser("chrome").Page("*").Panel(0).Panel(0).Panel(0).Section("content").Panel(1).Panel("applicantForm").Panel(0).Form("ttt").Panel(0).Panel(0).Panel(7).Panel(0).Panel(0)
panelobj = page1.Child(0).Name
set page2 = page1.panelobjIm using like the above to find the Panel name. Here panelobj returns the correct name of the object.
But page2 always returned as Non-existent object. Is there a reason for this?
Related Content
Recent Discussions
- 2 days agovladd1