Saturday 15 February 2014

excel - Using vba code to control a button (class selectpicker instead of select or formfield) in a html webpage -



excel - Using vba code to control a button (class selectpicker instead of select or formfield) in a html webpage -

i connect automatically fo next web pages: https://ssologin-bp2s.bnpparibas.com/ssologinaction.do need move greenish button (close "authentification" label) "cartesecure id" , cannot figure out how move button. below html code

<div class="row form-group"> <label class="col-xs-12 col-sm-4 col-md-4 col-lg-4 control-label" for="authenthication">authentification :</label> <div class="col-xs-10 col-sm-7 col-md-6 col-lg-6"> <select name="authlevels" id="authlevels" class="selectpicker" data-width="auto" data-style="btn-success"> <option value="1">standard</option> <option value="2">carte securid</option> <option value="3">certificat ipki</option> <option value="4">bnp paribas</option> </select>

i have tried several options on vba,

with ie.document

.getelementbyid("userid").value = user .getelementbyid("password").value = pwd .getelementbyid("authlevels").selectedindex = 2 .getelementbyid("authlevels").value = "2"

but nothing's working believe not work because class selectpicker , not formfield or select. might wrong of course.

if set me in right direction.

many thanks

the select box see in page source hidden , dynamically replaced greenish button

try using both:

.getelementbyid("authlevels").selectedindex = 1 'set hidden list: zero-based! .getelementbyid("authlevel").value = 2 'a hidden field associated greenish button

html excel vba

No comments:

Post a Comment