How to use Regular Expression

I am opening the google page with scripting and now using regular expression i want to enter browser and page name of google to enter the search text and search.

Questions by kaps_sachdeva

Showing Answers 1 - 7 of 7 Answers

browser("title:=.*Google.*").Page("title:=.*Google.*").webedit("Search").set "Test Search"



browser("title:=.*Google.*").Page("title:=.*Google.*").webbutton("Search").click

This is not something which will directly work by copy paste , but just to give you an idea of the concept.

Set ie=createobject("internetexplorer.application")
ie.navigate("http://[website url]/")
ie.visible=true
Browser("title:=TITLE").Page("title:=TITLE").WebEdit("name:=q").Set DataTable("search_keywords",dtGlobalSheet)
Browser("title:=TITLE").Page("title:=TITLE").WebButton("value:=Search").Click
Browser("opentitle:=TITLE").Close

In the above search_keywords is the coloumn name under global sheet

  Was this answer useful?  Yes

Or else,

set myp = browser("title:=.*").Page("title:=.*")

myp.webedit("name:=q").set "QTP"
myp.webbutton("value:=Search").Click

The above method is using static Descriptive Programming.
If you want to use dynamic DP, then create Description object.

  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