Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Test unable to record this step: clicking the first row out of various search results
#1
Not Solved
Iam trying to record on a web based application using QTP
On a screen i do a search by last name, city and i see
some entries returned. My test is unable to record this step: clicking the
first row out of various search results returned. Can any one please let me know how I should modify the
test. Thanks.
Reply
#2
Not Solved
Hi Hima,

In which environment your app is developed and the rows are identified with Spy?

If you can share the screen and spy screenshots, we can help you with most precised solution.
Thanks,
SUpputuri
Reply
#3
Not Solved
Java
I tried to record it and didnt record the action of clicking the first row;
I do not know if I need to use spy. Do I?
Reply
#4
Not Solved
Can I have the screenshot?

And when you run the script, does it throws any error? If yes, Can you provide me the error message.
Thanks,
SUpputuri
Reply
#5
Not Solved
HI Hima,

you can get out this issue by following the below steps

1) Add the WebTable object to OR and then use then select "column names" as property and value should be
".*Client Number;.*"
2) Now use the index value to identify the webtable ( I think it should be around 2 or more)
3) Now try to use the "GetRowWithCellText" method to get the row number of with the desired test
Code:
RowNumber = Browser("II").Page("II - Client_2").WebTable("ClientSearchResults").GetRowWithCellText("00371896")
CellData = Browser("II").Page("II-Client_2").WebTable("ClientSearchResults").GetCellData(ColumnNumber,RowNumber)
                  'U can give ColumnNumber as "1" if no other blank columns are exist.
Browser("II").Page("II - Client_2").WebElement(CellData).Highlight
Browser("II").Page("II - Client_2").WebElement(CellData).FireEvent "ondblclick"
          'I think there are certain cases where we have to double click on the rows inorder to open if it is only selection then you can use .click"
Please try this and let me know if you need any more info.
Thanks,
SUpputuri
Reply
#6
Not Solved
Thanks, will try.
Reply
#7
Not Solved
Hi,

I have a somewhat similar query:

I have been trying to write a script that will do the following:
1. Open Google in IE
2. Search for a string (e.g., testing),
3. Click on Google Search button and then
4. on the search results page clicks on the topmost link.

I have written the following piece of code but am stuck at the step where the script is supposed to click on the topmost link in the search results:

Code:
SystemUtil.Run "iexplore.exe", "www.google.com"
Browser("title:=Google - Windows Internet Explorer").Page("title:=Google").webedit("name:=q").Set "testing"
Browser("title:=Google - Windows Internet Explorer").Page("title:=Google").webbutton("name:=Google Search").click

Set myLink = Browser("title:=testing - Google Search - Windows Internet Explorer").Page("title:=testing - Google Search").SelectRow 1
wait(2)
myLink.click


Can anyone please help me with the above script?
(By the way, when you try to see the object hierarchy for the links in the search results the Object Spy does not show a Webtable to be part of that hierarchy.)

Thanks,
Neeraj
Reply
#8
Not Solved
Can you please help again:

I tried the script:

Failing here

Code:
RowNumber=Browser("II").Page("II - Client").WebTable("Client Number").GetRowWithCellText("00371896")
CellData=Browser("II").Page("II - Client").WebTable("Client Number").GetCellData(1,1)
Thank You
Reply
#9
Not Solved
Hi Hima,

Please follow this code and it will solve ur issue.
Code:
Set Objclick=Browser("xxxxxxxxxxxx").Page("xxxxxxxxxxxxxx").WebTable("xxxxxx").ChildItem("row","Column","Weblink",0)

objclick.Click
Here row=First row as you said
Column=pass the column value where u find the link (which u want to click)
Please let me know if you need any calrification.




Venkat.Batchu
Reply
#10
Not Solved
Hi venkatbatchu,

I don't think this would resolve the issue that I had posted. I guess, the piece of code that you have mentioned needs the user to specify the exact web link that the user wants to click on whereas what I want to to do here is click on any link that appears in the top row.

Please correct me if I am wrong.

Anyways, thanks for the reply.
Neeraj
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  how to select value from google search box dropdown +QTP prajyot 0 2,924 06-28-2017, 06:30 PM
Last Post: prajyot
  Searching for and selecting row in Datawindow zsl0009 0 2,839 08-04-2015, 01:02 AM
Last Post: zsl0009
  Search and import data from excel under some rules. nwpulele 2 2,970 02-19-2015, 04:10 AM
Last Post: supputuri
  QTP not clicking on the flex button sudheerch 2 3,664 12-03-2013, 12:56 PM
Last Post: sudheerch
  Clicking command button in accesss form mark_cielos24@yahoo.com 1 3,377 05-07-2013, 10:52 PM
Last Post: agarwl.anurag

Forum Jump:


Users browsing this thread: 1 Guest(s)