08-24-2011, 12:43 AM
I wanted to write a function to get page titles and pass it to return variable that I can use for the script when verifying the page title name. Is there syntax to also write the result to a file so I can find out if the variable value is correct or not.
Plus I want to do the same for Brower().Page(), etc. I started it, I do not know what to do from here. I used to write automation in C# and I was able to find and replace a variable from a function to pass it to the next set of code.
' *****************************
' Name: GetPageTitle
' ****************************
' ******************************
Plus I want to do the same for Brower().Page(), etc. I started it, I do not know what to do from here. I used to write automation in C# and I was able to find and replace a variable from a function to pass it to the next set of code.
' *****************************
' Name: GetPageTitle
' ****************************
Code:
Function GetPageTitle(pageTitleName)
pageTitleName = Browser("CreationTime:=0").Page("title:=.*").GetROProperty("title")
return pageTitleName
End Function