Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
clarification on datatable-read next
#1
Not Solved
QTP10
XP
IE8
this is a question of 'WHY' is it performing like this. I stated it in an ealier thread; but never understood.

Here is my current test:
Action1
Code:
Browser("Login").Page("My company").Check CheckPoint("My company_6")
Browser("Login").Page("My company").Link("Images").Click
Browser("Login").Page("My company_4").Check CheckPoint("My company_7")
Browser("Login").Page("My company_4").WebEdit("ctl00$cContent$Right$txtPro").Set DataTable("A", dtGlobalSheet)
Browser("Login").Page("My company_4").WebButton("Submit").Click
Browser("Login").Page("My company_4").Check CheckPoint("My company_8")
Browser("Login").Page("My company_4").WebButton("Back to Imaging").Click



Action2
Code:
Browser("My company").Page("My company").Check CheckPoint("My company")
Browser("My company").Page("My company").Link("Track").Click
Browser("My company").Page("My company_2").Check CheckPoint("My company_2")
Browser("My company").Page("My company_2").WebEdit("ctl00$cContent$Right$tbRow0").Set DataTable("B", dtGlobalSheet)
Browser("My company").Page("My company_2").WebButton("Submit").Click
Browser("My company").Page("My company_2").Check CheckPoint("My company_3")
Browser("My company").Page("My company_2").WebButton("Clear").Click

The program comes to the 'images screen'
inputs the first entry from the global tableA
'submits it-
then returns to "my company_6 or _7
proceeds to "track"
and takes the same pro (as the two table are identical)
submits
and returns back to 'MY company'
then 'images
where row two of table is used.

Question: Is this suppose to happen (Im new at this) or is there a change I need to make somewhere, where the ACTION1 will complete BEFORE the next action2 is started?
Reply
#2
Not Solved
Hi cocojava,

Can you state your problem with a clear explanation of what you want to do, what you did, what was the expected behaviour and what was the actual one ?
Reply
#3
Not Solved
The explanation of what I did was already listed above. That was the actual code. The 'actual' behavorior was also listed; but I will attempt to make clearer. The 'expected' behavior is for one action to go through the datatable row by row, THEN go on to the next action AFTER the first has completed entirely. Is there something I need to change somewhere in the properties or something perhaps?

Accodinging to the code above THIS IS the Actual:
The program comes to the 'Browser("Login").Page("My company").Link("Images")' screen
Inputs rowA from the global datatableA
Browser("Login").Page("My company").Link("Images").Click
Results are seen from that input-Browser("Login").Page("My company_4").Check CheckPoint("My company_8")
Next, a button appears on that screen to perform another lookup to use a new number (I would expect Row two from the datatable)
Browser("Login").Page("My company_4").WebButton("Back to Imaging").Click

INSTEAD, of performing the NEXT ROW in the datatable and completly ALL entries of that datatable...'Action2' is begun, steps completed in 'Action2' and then returned to 'Action1' row two of the datatable and so on.
Reply
#4
Not Solved
Hi,

From Run Properties select Run one iteration only. Then use for loop to execute your actions for the desired no of rows.
Reply
#5
Not Solved
Hi,
you can also use local correponding data sheet of the actions & set the Action call properties to run on all rows instead of using global datasheet.

Regards
Lenin.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Want to read the data from excel and set read value in the JavaTable rajeevk7 0 2,161 07-10-2017, 04:20 PM
Last Post: rajeevk7
  Automation clarification sudheerah 0 1,454 09-27-2012, 04:23 PM
Last Post: sudheerah
  Datatable add and datatable import sheet wheelercha 4 33,348 06-14-2012, 04:53 PM
Last Post: Arul
  Correct syntax for read and load global datatable from Resources tab in QC to QTP hari1024 1 4,985 12-08-2011, 10:43 AM
Last Post: sshukla12
  Read next datatable rather than login again cocojava 7 4,030 11-05-2010, 01:41 AM
Last Post: cocojava

Forum Jump:


Users browsing this thread: 1 Guest(s)