Jump to content

Recommended Posts

Posted

Hi,

I find it very difficult to implement an appropriate script to go through the domain selection field (one of three options) and switch to the user name and password fields.
This is the WEB identification screen for the HP OneView system - appends the relevant HTML section: (I would like to chose the "ccc.il" option)

<div class="hp-form-content">
                  <label for="hp-authn-provider-select" data-localize="core.login.directory">Directory</label>
                  <div class="hp-select-form"><div class="hp-select" tabindex="0"><label style=""></label><div class="hp-value" data-id="1" style="">ccc.il</div><ol class="hp-options" style="padding-top: 0px;"><li data-id="0" class=""><span class="hp-name">Local</span></li><li data-id="2" class=""><span class="hp-name">carlsberg.il</span></li><li data-id="1" class="hp-selected"><span class="hp-name">ccc.il</span></li></ol></div><select id="hp-authn-provider-select" class="hp-select hp-select-select" style="display: none;">
                  <option value="0">Local</option><option value="2">car.il</option><option value="1">ccc.il</option></select></div>
                </div>

 

Posted

Yeh i already try that but im getting wrong syntax message, I guess I'm wrong in script syntax :-)

Posted
#include <IE.au3>
$site = "https://hp-oneview"
$oIE = _IECreate($site)
$ohp-select = _IEGetObjById($oIE, "hp-value")
$ohp-Select = _IETagNameGetCollection($ohpselect, "ccc.il", 0)
$ohp-select.focus
_IEFormElementOptionSelect($ohp-Select, "ccc.il", 1, "byText")

Yeh i already try that but im getting wrong syntax message, I guess I'm wrong in script syntax :-)

Posted

I can see two obvious errors in the _IETagNameGetCollection line --

  1. Missing hypen in the variable name
  2. The 2nd parameter should be a tag name, ie: div, input, span, etc

Also, your _IEGetObjById will fail because there isn't any element with the id "hp-value". This appears to be a element's class. There are plenty of examples on the forum of retrieving an element by it's class, so I would suggest that you dig a little deeper for a solution.

Posted

You can't have hyphens in a variable name, otherwise you're going to get syntax errors, so change $ohp-select to $ohpselect

Also the select option is actually hidden (id = "hp-authn-provider-select") and so you would need to test a, whether you can change the selection and if it has any effect on the "divs" above which are what you actually see on the page.  Hope that makes sense.

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
  • Recently Browsing   0 members

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