Name change dynamically

While trying to pass the pageName dynamically, Why the below code does not work?
Browser("Browser").Navigate linkURL
pageName = Browser("Browser").Page("micclass:=Page").GetROproperty( "title" )
Browser("Browser").Page(pageName).WebEdit("Write something...").set(msg)
Browser("Browser").Page(pageName).WebButton("Post").Click

Showing Answers 1 - 2 of 2 Answers

Hi,
As per your code,you are getting the title property of the page and assiginig to variable - pageName.so pageName is a variable name and not the logical name of an object.Either of the below code works.

  Was this answer useful?  Yes

Ritesh Kawadkar

  • Jan 8th, 2016
 

You are using OR after DP, try below

Code
  1. Browser("Browser").Navigate linkURL

  2. pageName = Browser("Browser").Page("micclass:=Page").GetROproperty( "title" )

  3. Browser("Browser").Page(pageName).WebEdit("attached_text:=Write something...").set(msg)

  4. Browser("Browser").Page(pageName).WebButton("lable:=Post").Click

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions