Fyzzle Posted November 1, 2012 Share Posted November 1, 2012 The scenario I have is that I have to go online to request keys for software packages and I would like to script out as much as possible. I've automated getting the key but I would like to be able to select it and assign it to a variable for later use, and I'm not sure how to get it. Here's the spot in the page where I can see it, i've changed the key around so it's not a real key, but obviously it will change every time. <tr> <td>Activation Id: <div class=note>Activation Id is Case Sensitive</div> </td> <td>e12a-daf6-812d-4abe-b9h2-3acb-9qqf-0709</td> </tr> There's also a second spot where it appears, not sure if that would work better or not. <tr> <td>Details:</td> <td><a href="/wba/licenseDetails.do?license=e12a-daf6-812d-4abe-b9h2-3acb-9qqf-0709&server=FNO" target="_blank">License details</a></td> </tr> I've looked at _IEBodyReadText but I don't see a way to just pull a key out of the code, anyone run into something like this yet? Clicking that link gets me to another page but is not anymore helpful with any objects I can reference. Thanks guys. Link to comment Share on other sites More sharing options...
jdelaney Posted November 1, 2012 Share Posted November 1, 2012 use the _IETable* functions to strip text of tables into arrays Fyzzle 1 IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Danp2 Posted November 2, 2012 Share Posted November 2, 2012 You could use _IELinkGetCollection to get all the links and then scan the hrefs of the resulting collection for those that match your desired URL, ie: /wba/licenseDetails.do. Then just parse the href to get the license number. Latest Webdriver UDF Release Webdriver Wiki FAQs 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