ComradVlad Posted September 5, 2019 Share Posted September 5, 2019 Hey guys, I have seen threads regarding running javacscript directly with autoit using "document.parentwindow.execScript" However I have a question regarding how I would use this specifically in my scenario. I'm a bit of a noob when it comes to this stuff. There is a page with a drop down menu. The drop down menu contains a list of actions. When you use the drop down menu and click on an action it automatically performs that action. the code for the element is this: expandcollapse popup<select onchange="markActivity(this, 'checkboxClass0');" id="selectActionId"> <option value="" selected="selected">(Select an Action)</option> <option value="Print">Print</option> - - <option value="BatchReview">Batch Review</option> - - <optgroup label="Mark"> <option value="1_false" class="Printed">Printed</option> <option value="2_false" class="Exported">Exported</option> <option value="3_false" class="Visit Posted">Visit Posted</option> <option value="17_false" class="QA In Progress">QA In Progress</option> <option value="5_false" class="Pushed">Pushed</option> <option value="34_false" class="Push Declined">Push Declined</option> <option value="6_false" class="Fax Pending">Fax Pending</option> <option value="7_false" class="Faxed">Faxed</option> <option value="8_false" class="Fax Failed">Fax Failed</option> <option value="43_false" class="NOE Data Verified">NOE Data Verified</option> <option value="9_false" class="Signed">Signed</option> <option value="44_false" class="NOE">NOE</option> <option value="10_false" class="Returned">Returned</option> <option value="24_true" class="Order Signed">Order Returned</option> <option value="23_true" class="Order Sent">Order Sent</option> <option value="13_false" class="Clinical">Clinical Scheduled</option> <option value="14_false" class="No Clinical">No Clinical</option> <option value="16_false" class="No Therapy">No Therapy</option> <option value="15_false" class="Therapy">Therapy Scheduled</option> <option value="4_false" class="QA">QA</option> <option value="19_false" class="Coding In Progress">Coding In Progress</option> <option value="18_false" class="Coded">Coded</option> <option value="21_false" class="1st Billable Posted">1st Billable Posted</option> <option value="20_false" class="POC Complete">POC Sent</option> <option value="22_false" class="Export Ready">Export Ready</option> <option value="25_false" class="Face to Face">Face to Face</option> <option value="27_false" class="Orders In">Orders In</option> <option value="28_false" class="Notes In">Notes In</option> <option value="29_false" class="Ready to Bill">Ready to Bill</option> <option value="30_false" class="Billed">Billed</option> <option value="31_false" class="Review In Progress">Review In Progress</option> <option value="32_false" class="Signature Verified">Signature Verified</option> <option value="35_false" class="Pre Claim Review Form Ready for Submission">Pre Claim Review Form Ready for Submission</option> <option value="36_false" class="Pre Claim Review Sent">Pre Claim Review Sent</option> <option value="37_false" class="Pre Claim Review Received">Pre Claim Review Received</option> <option value="40_false" class="Do Not Track">Do Not Track</option> <option value="42_false" class="Paid">Paid</option> </optgroup> <optgroup label="Unmark"> <option value="-1">Printed</option> <option value="-2">Exported</option> <option value="-3">Visit Posted</option> <option value="-17">QA In Progress</option> <option value="-5">Pushed</option> <option value="-34">Push Declined</option> <option value="-6">Fax Pending</option> <option value="-7">Faxed</option> <option value="-8">Fax Failed</option> <option value="-43">NOE Data Verified</option> <option value="-9">Signed</option> <option value="-44">NOE</option> <option value="-10">Returned</option> <option value="-24">Order Returned</option> <option value="-23">Order Sent</option> <option value="-13">Clinical Scheduled</option> <option value="-14">No Clinical</option> <option value="-16">No Therapy</option> <option value="-15">Therapy Scheduled</option> <option value="-4">QA</option> <option value="-19">Coding In Progress</option> <option value="-18">Coded</option> <option value="-21">1st Billable Posted</option> <option value="-20">POC Sent</option> <option value="-22">Export Ready</option> <option value="-25">Face to Face</option> <option value="-27">Orders In</option> <option value="-28">Notes In</option> <option value="-29">Ready to Bill</option> <option value="-30">Billed</option> <option value="-31">Review In Progress</option> <option value="-32">Signature Verified</option> <option value="-33">Diagnosis Exported</option> <option value="-35">Pre Claim Review Form Ready for Submission</option> <option value="-36">Pre Claim Review Sent</option> <option value="-37">Pre Claim Review Received</option> <option value="-40">Do Not Track</option> <option value="-42">Paid</option> </optgroup> </select> So what javascript function would I have to run to select value -23 for example? Link to comment Share on other sites More sharing options...
Danp2 Posted September 5, 2019 Share Posted September 5, 2019 You didn't state which browser you're using. For IE, take a look at _IEFormElementOptionSelect in the help file. ComradVlad 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
ComradVlad Posted September 5, 2019 Author Share Posted September 5, 2019 (edited) 6 minutes ago, Danp2 said: You didn't state which browser you're using. For IE, take a look at _IEFormElementOptionSelect in the help file. Internet Explorer However the reason I'm not doing formelementoptionselect is because AUtoit it doesn't see the form. It shows 0 forms using form get collection and only shows one form if i cycle through the iframes but it isn't that one. So I'm not exactly sure whats going on there and figured it would be easier to just call the javascript directly. Edited September 5, 2019 by ComradVlad Link to comment Share on other sites More sharing options...
ComradVlad Posted September 5, 2019 Author Share Posted September 5, 2019 27 minutes ago, Danp2 said: You didn't state which browser you're using. For IE, take a look at _IEFormElementOptionSelect in the help file. NVM im stupid, I was looking at the wrong element ID, got it now, thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now