Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Descriptive Programming By giving the description in form of the string arguments
#1
Solved: 10 Years, 9 Months ago
Hi All

I m writing a code for a website.
where i want to prove the occurence of a element many times.
i don't want to add that element into object repository.
so i m using Descriptive Programming By giving the description in form of the string arguments.

this is my code,
Code:
Browser("abc").Page((DataTable("pageName", dtGlobalSheet))).WebElement("title:=Amitabh Bacchan","html tag:=DIV","class:=ab_pointer").Exist

Is this the right way to do this?
Reply
#2
Solved: 10 Years, 9 Months ago
Hi,

Have u added the page object in OR, if not then pass the values as title instead of simply specifying the name as u did .Page((DataTable("pageName", dtGlobalSheet)))

Regards,
Sankalp
Reply
#3
Solved: 10 Years, 9 Months ago
yes I have added the page object in OR, and not using title attribute bcoz the page name is not static.
Code:
.Page((DataTable("pageName", dtGlobalSheet)))


One more thing
i want to prove that WebElement exists
This is my code:

Code:
Browser("acb").Page((DataTable("pageName", dtGlobalSheet))).WebElement("html tag:=DIV","class:=ab_pointer").Exist

the webelemt is having only 1 unique property that is "display none/block"

how to deal with this property in qtp ?
Reply
#4
Solved: 10 Years, 9 Months ago
Hi,
Are u able to identify the webelement using htnl tag and class????

Regards,
Sankalp
Reply
#5
Solved: 10 Years, 9 Months ago
Hi All

can anyone tell me that how to deal with changing page name while using descriptive programing?

this is my code
Code:
Browser("sdsd").Page("dsd").Link("html tag:=A","text:=Report Abuse").Exist
where in
Page("sia") - the page value is changing everytime.


Thanks
sia
Reply
#6
Solved: 10 Years, 9 Months ago
why dont you use regula expression???

Try this

Code:
Browser("title:=sdsd").Page("title:=.*").Link("html tag:=A","text:=Report Abuse").Exist
Let me know if you need more help.

Regards,
Ankesh
Reply
#7
Solved: 10 Years, 9 Months ago
Code:
Browser("title:=sdsd").Page("title:="&datatable("a",dtglobalsheet)).Link("html tag:=A","text:=Report Abuse").Exist
or
Code:
a=datatable("a",dtglobalsheet)
Browser("title:=sdsd").Page("title:="&a).Link("html tag:=A","text:=Report Abuse").Exist
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Can we test Salesforce Standard form using QTP? yona34 0 943 05-22-2018, 10:57 AM
Last Post: yona34
Question Strange form, cant get it marvson 0 1,349 05-12-2016, 07:35 PM
Last Post: marvson
  Descriptive PROGRAMMING sandeepm1989 0 2,011 01-21-2016, 11:46 AM
Last Post: sandeepm1989
  How to pass a date from Excel sheet to web form revati.shendure 1 2,820 11-27-2014, 11:54 AM
Last Post: revati.shendure
  Form testing with UFT12 renukant@gmail.com 3 2,984 05-23-2014, 04:09 PM
Last Post: excellentpawan123

Forum Jump:


Users browsing this thread: 1 Guest(s)