Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Achieving Visual Relation Identifier option using AOM
#1
Not Solved Question 
Hi,
I want to find a text box which is placed in left of Label for the text box. If I use OR, then I will achieve as shown in screenshot attached. But I want to do the same within the scripts itself using Automation Object Model.

Any ideas? How to achieve this?
Thanks...


Attached Files Image(s)
   
Reply
#2
Not Solved
Done using below code.
Code:
Dim VisualRelation, RelationToTextBox, TextBoxDesc
Set VisualRelation = VisualRelations.Create
Set RelationToTextBox = VisualRelation.Add
RelationToTextBox.relatedobjectpath = "JavaWindow(""title:=Main"").JavaStaticText(""label:=Box1"")"
RelationToTextBox.relativeposition = micRelLeft
RelationToTextBox.setargument micRelInline, True

Set TextBoxDesc = Description.Create
TextBoxDesc("Class Name").Value = "JavaEdit"
TextBoxDesc("visual relations").Value = VisualRelation
JavaWindow("title:=Main").JavaEdit(TextBoxDesc).Type "val"
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to close/restart UFT in "Not responding" status with AOM script CharlieMadrid 0 1,252 05-21-2020, 08:46 PM
Last Post: CharlieMadrid
  Can we set ordinal identifier at runtime qtplearner88 1 3,734 07-31-2013, 12:33 AM
Last Post: Ankur
  Adding Visual Relation id via script to new object jcraig26 1 4,121 06-24-2013, 01:26 PM
Last Post: ourhari
  Visual Relations does not work with DP ourhari 5 4,737 06-24-2013, 01:04 PM
Last Post: ourhari
  Adding a Visual ID - creating a function jcraig26 0 2,584 11-09-2012, 02:56 AM
Last Post: jcraig26

Forum Jump:


Users browsing this thread: 1 Guest(s)