Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Web Element
#1
hi,

In Search Panel "User Name" is Mandatory field.

if we not given "User Name" then system displaying validation message as ""Following fields have invalid data :User Role"", this validation message QTP identifying as Web Element Visible property as ""True""

if i given "User Name" then system displaying Search Result then QTP identifying as Web Element Visible property as ""Empty""

Code:
IF element visible property = true then ""statement"' Else "'statement" end if

my problem is above if condition else is not working because of QTP identifying as Web Element Visible property as ""Empty""

there is no alternate to me.

please help me what to do.

Regards,
Praveen Raaj.
Reply
#2
please help me anyone

Regards,
Praveen Raaj.
Reply
#3
i am unable to understand your question, can you please elaborate your problem a little more?
Reply
#4
yours question is not clear raj
Reply
#5
hi,

In search Panel User Name is Mandatory field .

when i click on Search button for records of that user if i given User Name then system displaying records
else displaying validation as """Following fields have invalid data :User Role""'.

this validation message is identifying Qtp as webelement and property visible as ""True""


when ever records displaying then that webelement is not displaying and QTP is not identifying that object it returns visible property as nothing.

my problem is if condition is not working based on that webelement visible property.


please help me.

Regards,
Praveen Raaj.
Reply
#6
My question to you here is , does QTP throw a runtime error, with description saying something like that "object not found" ?

and my suggestion would be to take a safer approach, and first check if the web element exists... just a example code idea...

Code:
if Browser().Page().WebElement().Exists(5) Then if Browser().page().WebElement().GetROProperty("visible") Then //Your code for when the element is visible Else //Your code for when element exists in the page but is not visible Else //Your Code for when the element totally does not exist on the page

your problem might get solved this way around.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Page element keep changing chong67 4 5,332 11-08-2016, 09:17 PM
Last Post: Paul Rammone
  Choosing element from array marvson 1 2,432 06-29-2016, 02:55 PM
Last Post: Ankesh
  Web Element: Not able to select value from drop down in Web Element. Rajeev 4 6,093 08-04-2015, 06:03 PM
Last Post: kbhargava505
  How to capture tool tip within a web element frebuffi 3 4,382 11-10-2014, 10:06 AM
Last Post: learning_UFT
  How to connect two web element objects? zawarepradeep@gmail.com 1 3,096 07-23-2014, 11:23 PM
Last Post: Ankur

Forum Jump:


Users browsing this thread: 1 Guest(s)