Jump to content

Java Combobox value set


Recommended Posts

Hi All,

I am trying to automate a java application which has many combo boxes without name. JAVA Ferret couldn't recognize the combo boxes. However i tried to select value from the combo boxes using the below code, Its woking fine with the first combo box but not working for the second combo box. can any one of you suggest me how i can instruct AutoIT to recognize the second combo box? I have attached the snapshot of my application & java ferret, Java monkey properties with this post. any guidance will be highly appreciated.

---------------

;For Combo1

---------------

$java_obj1 = _JavaObjSelect("", "", "combo box", 1)

$java_obj1 = _JavaObjValueSet("", "", "combo box", 1)

---------------

;For Combo2

---------------

$java_obj2 = _JavaObjSelect("", "", "combo box", 2)

$java_obj2 = _JavaObjValueSet("", "", "combo box", 1)

Thanks and Regards,

Ilayaraja

Combobox issue.zip

Edited by ilaya1234
Link to comment
Share on other sites

Ref: in Example Scripts

:)

Hi,

I am creating the scripts based on the JAVA.au3 only. The script (For Combo2) is selecting the second combo box but its trying to set the value in first combo box instead of setting the value in second combo box. can any one of you please help me resolve this issue.

---------------

;For Combo1

---------------

$java_obj1 = _JavaObjSelect("", "", "combo box", 1)

$java_obj1 = _JavaObjValueSet("", "", "combo box", 1)

---------------

;For Combo2

---------------

$java_obj2 = _JavaObjSelect("", "", "combo box", 2)

$java_obj2 = _JavaObjValueSet("", "", "combo box", 1)

Thanks and Regards,

Ilayaraja.M

Link to comment
Share on other sites

Hi,

I am creating the scripts based on the JAVA.au3 only. The script (For Combo2) is selecting the second combo box but its trying to set the value in first combo box instead of setting the value in second combo box. can any one of you please help me resolve this issue.

---------------

;For Combo1

---------------

$java_obj1 = _JavaObjSelect("", "", "combo box", 1)

$java_obj1 = _JavaObjValueSet("", "", "combo box", 1)

---------------

;For Combo2

---------------

$java_obj2 = _JavaObjSelect("", "", "combo box", 2)

$java_obj2 = _JavaObjValueSet("", "", "combo box", 1)

Thanks and Regards,

Ilayaraja.M

It worked. I have to add the Instance parameter like given in the code below.

---------------

;For Combo1

---------------

$java_obj1 = _JavaObjSelect("", "", "combo box", 1)

$java_obj1 = _JavaObjValueSet("", "", "combo box", 1,1)

---------------

;For Combo2

---------------

$java_obj2 = _JavaObjSelect("", "", "combo box", 2)

$java_obj2 = _JavaObjValueSet("", "", "combo box", 1,2)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...