Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Frustrated with Random Numbers - Help :(
#7
Solved: 11 Years, 4 Months ago
Okei, now am getting the output value in the runtime datatable as attached.
The challenges now are:

- How do I make sure that this id exists in the WebTable for example?
- Whenever a new survey is created, a new edit and delete buttons are created also. Each has a link with the id inside. How do I make sure that it is clicking the right delete button for example? Right now it is clicking delete on a certain row only. Here is my crappy code from a crappy script writer Big Grin
'Adding survey here
Code:
Browser("Web Single Sign On").Page("ad1Domain").Link("Quick Surveys").Click
Browser("Web Single Sign On").Page("ad1Domain_2").Link("Create new survey").Click
Browser("Web Single Sign On").Page("ad1Domain_3").WebEdit("T2200210021164289598977{action").Set "13.09.2009"
Browser("Web Single Sign On").Page("ad1Domain_3").WebEdit("T2200210021164289598977{action_2").Set "13.09.2011"
Browser("Web Single Sign On").Page("ad1Domain_3").WebEdit("T2200210021164289598977{action_3").Set "Automator"
Browser("Web Single Sign On").Page("ad1Domain_3").WebEdit("T2200210021164289598977{action_4").Set "Automation?"
Browser("Web Single Sign On").Page("ad1Domain_3").Link("ADD SURVEY").Click
'Taking output value

Code:
Browser("Web Single Sign On").Page("ad1Domain_4").WebElement("222").Output CheckPoint("222")

Browser("Web Single Sign On").Page("ad1Domain_4").Check CheckPoint("ad1Domain")
Browser("Web Single Sign On").Page("ad1Domain_4").Link("Back to main").Click
'Deleting the survey, of course the wrong one!

Code:
Browser("Web Single Sign On").Page("ad1Domain_5").WebElement("DELETE").Check CheckPoint("DELETE")

Browser("Web Single Sign On").Page("ad1Domain_5").Link("DELETE").Click
Browser("Web Single Sign On").Dialog("Microsoft Internet Explorer").Activate
Browser("Web Single Sign On").Dialog("Microsoft Internet Explorer").Check CheckPoint("Microsoft Internet Explorer")
Browser("Web Single Sign On").Dialog("Microsoft Internet Explorer").WinButton("OK").Click


Attached Files Image(s)
   
Reply


Messages In This Thread
RE: Frustrated with Random Numbers - Help :( - by Scanditester - 04-06-2009, 07:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Get numbers inside all webelements in webtable and sort them pradeep537 1 2,822 08-04-2016, 01:24 AM
Last Post: Ankur
  Create a random number starting with an alphabet QTPmate 4 4,193 07-31-2014, 09:29 AM
Last Post: QTPmate
  Random Values from Drop-Down profqa 5 6,025 12-06-2013, 09:01 AM
Last Post: basanth27
  GCD of N numbers Venkat`s 1 2,049 10-17-2013, 08:58 PM
Last Post: Parke
  Creating Random String SomeIntern 0 5,082 08-21-2013, 09:10 PM
Last Post: SomeIntern

Forum Jump:


Users browsing this thread: 2 Guest(s)