Jump to content
Sign in to follow this  
ilaya1234

Java Combobox value set

Recommended Posts

ilaya1234

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

Share this post


Link to post
Share on other sites
ilaya1234

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

Share this post


Link to post
Share on other sites
ilaya1234

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)

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.