Ask a Question

Regarding the NativeWebObject function to Find Elements in Web pages

Paki
Occasional Contributor

Regarding the NativeWebObject function to Find Elements in Web pages

Dear All,

NativeWebObject.Find() doesn't work (the web page is not found despite I open the page on the explorer before starting the playback)



Kindly find attached log screen shot



This is my Script

Sub
NativeFindElement


    Dim PageObj


    Dim ProductLink


    Set PageObj=Sys.Process("iexplore").Page("http://www.automatedqa.com/")


    Set ProductLink=PageObj.NativeWebObject.Find("title","Products","A")


    If ProductLink.Exists Then


    Log.Message("ProductLink")


End If


 



End Sub



Your help is highly appreciated

Thanks


3 REPLIES 3
AlexanderM
Staff

Hi Pakinam,



It looks like you are using Internet Explorer 8. By default, this browser launches a new process per each tab, and your Page object seems to be present in the processes with different indexes (currently, you refer to the process with index 1 by default). You can make Internet Explorer launch only one process. To do this, in the system registry, search for the TabProcGrowth value in the HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main key (if it is not present, add the value of the string type) and set it equal to zero.



For more informaton, refer to the MSDN Blogs record.



If this does not help or the Internet Explorer version differs, refer to the Handling the 'Object Not Found' Errors help topic. 



Please let us know whether these suggestions help.
-----

Alexander
Customer Care Manager
Paki
Occasional Contributor

Hi

I am not using Internet Explorer 8, My version doesn't have tabs and yet I have the same problem

Pakinam
AlexanderM
Staff


Hi Pakinam,





We tried running your script and did not have any problems. Do the suggestions from the mentioned topic help? If they do not, please zip your entire project suite folder along with the log of the failed test execution and send us the archive. Make sure that messages in your log correspond to the latest version of your tests.
-----

Alexander
Customer Care Manager
cancel
Showing results for 
Search instead for 
Did you mean: