excel - How to click on a link that keeps on changing depending upon whats entered in searchbox -


i'm unable click on link in page since link keeps on changing after entering number in each search box. tried few vba codes not able achieve it.

<a href="../finding/data?data=all&amp;version=0&amp;edocid=0&amp;ssid=05bdpusphl&amp;refnum=15q100595&amp;defaultemail=abc@abc.com&amp;snpid=15834667918&amp;servicecd=e" target=_blank>data</a>

sub try()     dim ie object     dim myhtml_element ihtmlelement     dim myurl string     dim myurlser string     set ie = createobject("internetexplorer.application")     on error goto err_clear     myurl = "[http://test.com/login][1]"     set mybrowser = new internetexplorer     mybrowser.silent = true     mybrowser.navigate myurl     mybrowser.visible = true         loop until mybrowser.readystate = readystate_complete     set htmldoc = mybrowser.document     htmldoc.all.j_username.value = "user" 'enter email id here     htmldoc.all.j_password.value = password'enter password here     each myhtml_element in htmldoc.getelementsbytagname("input")         if myhtml_element.type = "button" myhtml_element.click: exit     next     on error goto err_clear     myurl = "http://test.com/home"     set mybrowser = new internetexplorer     mybrowser.silent = true     mybrowser.navigate myurl     mybrowser.visible = true         loop until mybrowser.readystate = readystate_complete     set htmldoc = mybrowser.document     htmldoc.all.searchkeyword.value = "223645" 'enter email id here     call htmldoc.parentwindow.execscript("submitsearch();", "javascript")     each l in ie.document.getelementsbytagname("a")         if l.classname = "doccheckbox" l.click: exit     next     err_clear:     if err <> 0         err.clear         resume next     end if end sub 


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -