Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Test unable to record this step: clicking the first row out of various search results
07-19-2010, 09:57 PM
Post: #1
Test unable to record this step: clicking the first row out of various search results

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.
Find all posts by this user
Quote this message in a reply
07-19-2010, 10:02 PM
Post: #2
RE: Test unable to record this step: clicking the first row out of various search results
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
Two benefits of Failure. First it makes us to Learn what does not work and second it gives us the opportunity to try a new approach.
Find all posts by this user
Quote this message in a reply
07-19-2010, 10:56 PM
Post: #3
RE: Test unable to record this step: clicking the first row out of various search results
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?
Find all posts by this user
Quote this message in a reply
07-19-2010, 11:57 PM
Post: #4
RE: Test unable to record this step: clicking the first row out of various search results
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
Two benefits of Failure. First it makes us to Learn what does not work and second it gives us the opportunity to try a new approach.
Find all posts by this user
Quote this message in a reply
07-20-2010, 08:19 PM
Post: #5
RE: Test unable to record this step: clicking the first row out of various search results
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
Two benefits of Failure. First it makes us to Learn what does not work and second it gives us the opportunity to try a new approach.
Find all posts by this user
Quote this message in a reply
07-22-2010, 11:01 AM
Post: #6
RE: Test unable to record this step: clicking the first row out of various search results
Thanks, will try.
Find all posts by this user
Quote this message in a reply
07-31-2010, 07:41 AM
Post: #7
RE: Test unable to record this step: clicking the first row out of various search results
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:

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
Find all posts by this user
Quote this message in a reply
08-09-2010, 11:20 PM (This post was last modified: 08-10-2010 08:17 AM by hima.)
Post: #8
RE: Test unable to record this step: clicking the first row out of various search results
Can you please help again:

I tried the script:

Failing here

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
Find all posts by this user
Quote this message in a reply
08-10-2010, 09:48 AM (This post was last modified: 08-10-2010 09:50 AM by venkatbatchu.)
Post: #9
RE: Test unable to record this step: clicking the first row out of various search results
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

Regards,
Venkat
Find all posts by this user
Quote this message in a reply
08-25-2010, 04:44 PM
Post: #10
RE: Test unable to record this step: clicking the first row out of various search results
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
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Unable to select an item from weblist and unable to enter text in edit box estherindu 5 1,495 05-15-2012 12:07 AM
Last Post: viswa
  How to recognize table row and column siwani 4 1,037 04-05-2012 05:06 PM
Last Post: verma.vik6
  Unable to export results in QTP 10.0 rameshrise3 5 1,583 11-15-2011 10:44 AM
Last Post: vinod123
  Unable to Upload the results to QC from QTP. skmattey 1 1,048 11-14-2011 04:39 PM
Last Post: Nisha M R
  Ignore Predefined Step Faliure mnybon 0 283 11-09-2011 02:07 PM
Last Post: mnybon

Forum Jump:


User(s) browsing this thread: 1 Guest(s)