It seems Interview questions from Ordain Solutions are
almost BASIC LEVEL-Easy.
I am asking one tough question..(I think.. May be easy for
some people)
In recorded script the - WebLink("cityinfo")
In reality, the WebLink name is "generalinfo"
How you can write function to click that changed web link.
NOTE: This functin should work with any Dynamic text link.
I will post the answer later.
Answer Posted / satish j
You can use regular expression to handle this.
so if the value of the name changes at run time it hardly
matters for QTP ,but if there are multiple links on apage
which typically is the case using only RE will not work as
object identification will be an issue. so along with this
provide assistive properties like html - tag, or alt
property,whcih are unique to the object so if recognition
becomes a problem it can be handled.
you can use the description object.
set weblinkrec = description.create
weblinkrec("name").value = ".*"
weblinkrec("htmltag").value = "xyz"
.....
and then use
Weblink(weblinkrec).click.
Note:
But always use smart identification where ever it is needed
as it slows down the execution of the script, typically when
there are same objects having conflicting properties.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How can i click on any Excel sheet's "H" column with out writing coordinates Ex:Window("Book1").WinObject("Book1").Click 498,14 I dont want to give coordinates like 498,14 Can i open "H" column by writing like Ex:Window("Book1").WinObject("Book1").Click "H" or Ex:Window("Book1").WinObject("Book1").Click "H","1" or Ex:Window("Book1").WinObject("Book1").Click H,1 If i want to click on "Sheet3" of an excel sheet, Can i open like Ex:Window("Book1").WinObject("Book1").Click "Sheet3" Please help me any one
How to execute a winrunner script in quicktest professional?
Differences between quicktest professional (qtp) and winrunner?
What is the extension of the qtp local repository?
Differentiate the type of test cases which can be automated and which cannot be automated?
What is difference in global and action sheet in qtp?
There are 10 rows in the datatable. How can we fetch 2 rows and then skip 3rd row. After that, pick 4th & 5th row and skip 6th row. Please share code
Hi I have exp in manual testing and planning to move in automation testing qtp(9.2).So can help me how to automate customer relationship management tool using qtp and vb script this tool already developed so how can I test it whatever maintaining by development team like documents,various options just give the whole life cycle thanks in advance
How to get Traceability matrix from TD?
Brief the process of testing with UFT?
An action has both shared and local OR associated with it and both have the same object in them. In the test which one will be considered?
What is the parameterization?
How to make qtp understand the difference amongst the same type of objects .suppose there are 5 check boxes in a page and I have to choose the 2nd one, how to do that through script?
hou can we use vb script in qtp could u tell me breafly
What are the different attributes used with regular expression?