Friday, 11 May 2012

QTP Q/A's........................................................

How to select item from weblist?


Browser("Calendar").Page("Calendar").WebList("Hour").Select "#3"


Note - Indexing starts from 0 so the above line will fetch the 4th value from the drop down list. But if the
 values in the drop down change then  irrespective of the value you want, it will always give you the value
in the 4th position of the drop down.

1. Grab all the items in the list by using the value property.
2. Split the values if they are semicolon separated.
3. Compare the value which you need to select vs the value in the split array.
4. Then select based on the index.


How to check a value exists in a weblist using QTP ??

noItems=browser("name:=Web*.*").page("title:=Web*.*").weblist("name:=depart").GetROProperty("items count")
flag=false
For i=1 to noItems
If lcase(browser("name:=Web*.*").page("title:=Web*.*").weblist("name:=depart").GetItem(i))="uday" then
flag=true
end if
Next

If flag=true Then
msgbox "Exists"
else
msgbox "Not Exists"
End If
Tribute to RabiThakur on the holy occasion of his 151 Birth Centenary......

Eso he Boishakh eso eso
এসো হে বৈশাখ এসো এসো


এসো, এসো, এসো হে বৈশাখ
তাপসনিশ্বাসবায়ে মুমূর্ষুরে দাও উড়ায়ে,
বৎসরের আবর্জনা দূর হয়ে যাক
যাক পুরাতন স্মৃতি, যাক ভুলে যাওয়া গীতি,
অশ্রুবাষ্প সুদূরে মিলাক।
মুছে যাক গ্লানি, ঘুচে যাক জরা,
অগ্নিস্নানে শুচি হোক ধরা
রসের আবেশরাশি শুষ্ক করি দাও আসি,
আনো আনো আনো তব প্রলয়ের শাঁখ
মায়ার কুজ্ঝটিজাল যাক দূরে যাক।



Dariye achho tumi amar ganer opare


দাঁড়িয়ে আছ তুমি আমার
                     গানের ওপারে।
আমার    সুরগুলি পায় চরণ, আমি
                     পাই নে তোমারে।

  বাতাস বহে মরি মরি
  আর বেঁধে রেখো না তরী,
  এসো এসো পার হয়ে মোর
            হৃদয়-মাঝারে।

  তোমার সাথে গানের খেলা
            দূরের খেলা যে,
  বেদনাতে বাঁশি বাজায়
            সকল বেলা যে।
  কবে নিয়ে আমার বাঁশি
  বাজাবে গো আপনি আসি,
  আনন্দময় নীরব রাতের
            নিবিড় আঁধারে।