Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CheckPoint
#1
Not Solved
I am trying to create a checkpoint on a web page that looks for a text string "Login Failure". This is only a part of the entire text string.

Using Standard Checkpoint, I created:
Code:
Browser("WisdomLogin").Page("WisdomLogin").WebElement("Login Failure.").Check CheckPoint("Login Failure.")
But this step fails no matter what I have tried.

I thought I wshould try GetROProperty but I am not sure how to use this.

Does anyone have a suggestion on what I should try? My end result is to use an If.. Then...ElseIf statement to determine which action to take.

Any thoughts/ideas or suggestions would be great.

L
Reply
#2
Not Solved
Hi MV,

Can you please provide the details of your checkpoint: i.e. what all properties it is checking and the detailed result which tells why it is failing.
Reply
#3
Not Solved
The checkpoint I was trying to use was a Text Checkpoint and an Image Checkpoint. Neither one seemed to work as I thought. Once I changed to a Standard Checkpoint, all seems to work fine.

Properties, I am not sure which properties you are refering to. Mostly, I am not sure how to find them after I created the checkpoints. In the Text Checkpoint, I ofcourse selected Insert->Checkpoint->Text Checkpoint durring Rec. I highlighted the desired text, see screenshot, and I get
Code:
Browser("WisdomLogin").Page("WisdomLogin").Check CheckPoint("WisdomLogin")

Same steps with the bitmap checkpoint (see attachment)
Code:
Browser("WisdomLogin").Page("WisdomLogin").WebElement("WebElement").Check CheckPoint("WebElement")

Using a standard checkpoint seems to be the only checkpoint that works.

thxxx
Lor


Attached Files
.doc   Checkpoint.doc (Size: 52.5 KB / Downloads: 69)
Reply
#4
Not Solved
Hi,

You can do that programmatically as well.
Here we go.

Code:
Login_Status=Browser("WisdomLogin").Page("WisdomLogin").WebElement("Login Failure.").GetROProperty("Innertext")

If (Instr(1,Login_Status,"Login Failure")>0) Then
     Msgbox "PASS...Required Text String exist"
Else  
     Msgbox "FAIL...Required Text String not exist"
End if
Reply
#5
Not Solved
Thx Chilam, I will need to look into this code more to understand the ongoings.

I have three issues I need to look for. 1, if the page has a Failure due to a bad password/ID, 2, succesfull logiin, 3, if neither is seen the server must be down so Exit.

I have the below code working except the ElseIf statement (ElseIf Browser("Wisdom CTE").Page("WisdomLogin").WebElement("text:=Login Failure.").Exist Then
'Login Failed) does not see the test "Login Failure". My check points sees the text, just not the ElseIf statement. If within the broweser I find the text "Login Faiklure., then Exit. (Later I will add code to get the next Password in a table.)

ALSO.... Which is correct Exist or Exists? I see a lot of people using both. For me, the word Exists turns bold/blue but fails my script when I use it.

Code:
If Browser("WisdomLogin").Page("Wisdom CTE").Image("Wisdom").Exist Then
       'Login Passed -  Logout only appears when the login is successful
       Reporter.ReportEvent micPass, "Login", "Login Passed"  
ElseIf Browser("Wisdom CTE").Page("WisdomLogin").WebElement("text:=Login Failure.").Exist Then
       'Login Failed
        Reporter.ReportEvent micPass, "Login", "Login Failed - Bad User ID or Password"
        Browser("WisdomLogin").Close
Else
       'None of the object exist
        Reporter.ReportEvent micFail, "Login", "Login Failed. Unknown error"
        Browser("WisdomLogin").Close
End If
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Wink standard checkpoint and text checkpoint kiran10_rm 1 5,363 11-18-2010, 05:16 AM
Last Post: nandu
  fullscreen and bitmap checkpoint error "Cannot create bitmap checkpoint" meuline 2 4,723 12-10-2009, 09:17 PM
Last Post: meuline
  Checkpoint problems: Checkpoint starts before web page is loaded & therefore fails! IdontGetIt 1 3,922 11-20-2009, 11:45 AM
Last Post: basanth27
  Not able to add any other Checkpoint apart from Standard Checkpoint Rachna 7 8,656 04-02-2009, 11:05 AM
Last Post: nandu
  Not able to add any other Checkpoint apart from Standard Checkpoint Rachna 0 1,716 03-26-2009, 03:14 PM
Last Post: Rachna

Forum Jump:


Users browsing this thread: 1 Guest(s)