MRAJ Posted May 10, 2018 Author Share Posted May 10, 2018 Thanks i am able to click on the Document List..but now i stuck in the next page where i have to click on Public Folders ,which dont have HTML page..I tried with Below script but its not working: i am not seeing any error in output console. Local $sMyString = "Public Folders" Local $oLinks = _IELinkGetCollection($oIE) For $oLink In $oLinks Local $sLinkText = _IEPropertyGet($oLink, "innerText") If StringInStr($sLinkText, $sMyString) Then _IEAction($oLink, "click") ExitLoop EndIf Link to comment Share on other sites More sharing options...
Danp2 Posted May 10, 2018 Share Posted May 10, 2018 How do you know the element is a link? Can you show us the underlying HTML code for this "tree" structure? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
MRAJ Posted May 11, 2018 Author Share Posted May 11, 2018 (edited) Below is the HTML code i found: <SPAN id=ListingURE_treeNode4_name style="WHITE-SPACE: nowrap"><IMG id=ListingURE_treeNodeIcon_4 style="HEIGHT: 16px; WIDTH: 16px" border=0 alt="" src="http://server.com:8080/InfoViewAppActions/ure/ure/cache/images/kind/Folder/Unexpanded.gif"> Public Folders </SPAN> Edited May 11, 2018 by MRAJ Link to comment Share on other sites More sharing options...
MRAJ Posted May 11, 2018 Author Share Posted May 11, 2018 $oFrame = _IETagNameGetCollection($oIE, "span") $oSpan = _IEGetObjById($oFrame, "ListingURE_treeNode4_name") _IEAction($oSpan, "click") _IEImgClick($oIE, "Unexpanded.gif","src") Above 2 scripts i tried but no success. Link to comment Share on other sites More sharing options...
Danp2 Posted May 11, 2018 Share Posted May 11, 2018 2 hours ago, MRAJ said: Below is the HTML code i found: <SPAN id=ListingURE_treeNode4_name style="WHITE-SPACE: nowrap"><IMG id=ListingURE_treeNodeIcon_4 style="HEIGHT: 16px; WIDTH: 16px" border=0 alt="" src="http://server.com:8080/InfoViewAppActions/ure/ure/cache/images/kind/Folder/Unexpanded.gif"> Public Folders </SPAN> Well... that would explain why your attempt with _IELinkGetCollection failed. Please show us the results you get in the Output panel when you run the code in Scite. Without that, we can only guess at why it didn't work. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
MRAJ Posted May 11, 2018 Author Share Posted May 11, 2018 IE.au3 T3.0-2 Error from function _IEGetObById, $_IESTATUS_InvalidObjectType --> IE.au3 T3.0-2 Error from function _IEAction(click), $_IESTATUS_InvalidDataType --> IE.au3 T3.0-2 Warning from function _IEImgClick, $_IESTATUS_NoMatch --> IE.au3 T3.0-2 Warning from function _IEGetObjById, $_IESTATUS_NoMatch (ListingURE_listColumn_9_0_3) --> IE.au3 T3.0-2 Error from function _IEAction(click), $_IESTATUS_InvalidDataType >Exit code: 0 Time: 56.38 Link to comment Share on other sites More sharing options...
MRAJ Posted May 11, 2018 Author Share Posted May 11, 2018 $oFrame = _IETagNameGetCollection($oIE, "span") $oSpan = _IEGetObjById($oFrame, "ListingURE_treeNode4_name") _IEAction($oSpan, "click") _IEImgClick($oIE, "Unexpanded.gif","src") i tried even this script too.. Link to comment Share on other sites More sharing options...
Danp2 Posted May 11, 2018 Share Posted May 11, 2018 13 minutes ago, MRAJ said: IE.au3 T3.0-2 Error from function _IEGetObById, $_IESTATUS_InvalidObjectType You can't pass a collection (the result from _IETagNameGetCollection) as the first parameter of the other _IE functions. This is why you are getting this initial error. Assuming that there are still frames involved, I would suggest that you try something like this -- $oFrame = _IEFrameGetCollection($oIE, 0) $oSpan = _IEGetObjById($oFrame, "ListingURE_treeNode4_name") _IEAction($oSpan, "click") This obviously assumes that the desired element is located in the first frame. Since we can't access the site, you have to do some investigative work on your own to figure out what it will take to make this work. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
MRAJ Posted May 11, 2018 Author Share Posted May 11, 2018 I tried but no result.. $oFrame = _IEFrameGetCollection($oIE, 0) $oSpan = _IEGetObjById($oFrame, "ListingURE_treeNode4_name") _IEAction($oSpan, "click") --> IE.au3 T3.0-2 Warning from function _IEGetObjById, $_IESTATUS_NoMatch (ListingURE_treeNode4_name) --> IE.au3 T3.0-2 Error from function _IEAction(click), $_IESTATUS_InvalidDataType --> IE.au3 T3.0-2 Warning from function _IEGetObjById, $_IESTATUS_NoMatch (ListingURE_listColumn_9_0_3) --> IE.au3 T3.0-2 Error from function _IEAction(click), $_IESTATUS_InvalidDataType >Exit code: 0 Time: 56.62 Link to comment Share on other sites More sharing options...
Danp2 Posted May 11, 2018 Share Posted May 11, 2018 @MRAJ You have access to the website. You need to put on your detective's cap and take some time to figure out why it isn't working. How many frames are on the page? Which frame contains the desired elements? Once you figure that out, then you need to modify the code accordingly. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
MRAJ Posted May 11, 2018 Author Share Posted May 11, 2018 I am finding the below frames info in the Public Folder page: Link to comment Share on other sites More sharing options...
Danp2 Posted May 11, 2018 Share Posted May 11, 2018 So there's only one frame, and it doesn't contain the span element because the prior attempt to retrieve it within the frame failed. Therefore, I can only assume that the following would work -- $oSpan = _IEGetObjById($oIE, "ListingURE_treeNode4_name") _IEAction($oSpan, "click") Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
MRAJ Posted May 11, 2018 Author Share Posted May 11, 2018 its not working still. Below is the output result: --> IE.au3 T3.0-2 Warning from function _IEGetObjById, $_IESTATUS_NoMatch (ListingURE_treeNode4_name) --> IE.au3 T3.0-2 Error from function _IEAction(click), $_IESTATUS_InvalidDataType --> IE.au3 T3.0-2 Error from function _IEGetObById, $_IESTATUS_InvalidObjectType --> IE.au3 T3.0-2 Error from function _IEAction(click), $_IESTATUS_InvalidDataType >Exit code: 0 Time: 53.44 Link to comment Share on other sites More sharing options...
Danp2 Posted May 11, 2018 Share Posted May 11, 2018 Sorry, but it looks like I'm not going to be able to solve this for you. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
MRAJ Posted May 11, 2018 Author Share Posted May 11, 2018 any other way it will be possible..let me know if you need any info on this.. Link to comment Share on other sites More sharing options...
MRAJ Posted May 11, 2018 Author Share Posted May 11, 2018 is there any way by which instead of using IENavigate ..i can use click on the link URL Link to comment Share on other sites More sharing options...
MRAJ Posted May 11, 2018 Author Share Posted May 11, 2018 here some more HTML page..let me know if this can help.. <IMG class=ygtvaccessibleImg alt="Public Folders collapsed" src="http://server.com:8080/InfoViewAppActions/ure/ure/yui/build/treeview/assets/lp.gif"> _IEImgClick($oIE, "lp.gif","src") i tried even this too but it is not working... Link to comment Share on other sites More sharing options...
Danp2 Posted May 11, 2018 Share Posted May 11, 2018 12 minutes ago, MRAJ said: is there any way by which instead of using IENavigate ..i can use click on the link URL Unsure what you are asking here. Do you mean using commands other that the _IE ones? Sure, you could do that, but it's not the recommended method. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
MRAJ Posted May 11, 2018 Author Share Posted May 11, 2018 yes other than _IE ones...ok..is there any like click HTML page like that? Link to comment Share on other sites More sharing options...
Danp2 Posted May 11, 2018 Share Posted May 11, 2018 My only suggestion is to find a way to save the complete HTML page to a file and post it here as an attachment. 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