Pages

Monday, January 30, 2012

QTP and QC - User related functions - Add/Remove/GetUsersCount


These functions can be directly executed from QTP but make sure QC is connected through QTP.


Function to Remove User


Public Function RemoveUser(strUser)
'Declare local variables
Dim objCustUsers 'As Users object


On Error Resume Next
Set objCustUsers = QCUtil.QCConnection.Customization.Users


objCustUsers.RemoveUser(strUser)
QCUtil.QCConnection.Customization.commit
If Err.Number <> 0 Then
Reporter.ReportEvent micFail,"Remove User",Err.Description
Else
Reporter.ReportEvent micPass,"Remove User","The User " & strUser & " removed successfully"
End If
On Error Goto 0
'Release the object
Set objCustUsers = Nothing
End Function


Function to Add User:


Public Function AddUser(strUser, strUserGroup)
Dim objCust 'As Customization object
Dim objCustUsers 'As Users object


Set objCust = QCUtil.QCConnection.Customization


objCust.Load


On Error Resume Next
Set objCustUsers = objCust.Users
objCustUsers.AddUser strUser
If Err.Number <> 0 Then
Print Err.Description
On Error GoTo 0
ExitTestIteration
End If


Set objUsersGroup = objCust.UsersGroups
Set objCustGrp = objUsersGroup.Group(strUserGroup)
objCustGrp.AddUser(strUser)


objCust.commit


If Err.Number <> 0 Then
Reporter.ReportEvent micFail,"Adding User '" & strUser & "'",Err.Description
Else
Reporter.ReportEvent micPass,"Adding User",strUser & " Added successfully"
End If


On Error GoTo 0


Set objCust = Nothing
Set objCustUsers = Nothing
Set objUsersGroup = Nothing
Set objCustGrp = Nothing
End Function


Function to Get the number of users available on a particular QC Project:


Public Function GetUsersCount() 'Return as Integer
'Declare local variables
Dim objCustUsers 'As Users object
Dim objUserList


On Error Resume Next
Set objCustUsers = QCUtil.QCConnection.Customization.Users


Set objUserList = objCustUsers.Users
intUsersCount = objUserList.count
If Err.Number <> 0 Then
Reporter.ReportEvent micFail,"Get Users count",Err.Description
intUsersCount = -1
End If
On Error Goto 0
'For each USR in objUserList
' Print USR.name
'Next
Set objCustUsers = Nothing
Set objUserList = Nothing
GetUsersCount = intUsersCount
End Function

Thursday, January 19, 2012

QTP ClibBoard functions


Function to store the value into ClipBoard:

Public Function ClipBoardSetData(strData)
Dim objClipBoard 'As ClipBoard Object

'Create clipboard object
Set objClipBoard = DotNetFactory.CreateInstance("System.Windows.Forms.Clipboard","System.Windows.Forms")
objClipBoard.SetText(strData)

'Release the object
Set objClipBoard = Nothing
End Function

Function to Read the value from ClipBoard:


Public Function ClipBoardGetData() 'Return as String
Dim objClipBoard 'As ClipBoard Object

'Create Clipboard Object
Set objClipBoard = DotNetFactory.CreateInstance("System.Windows.Forms.Clipboard","System.Windows.Forms")
strData = objClipBoard.GetText

'Release the object
Set objClipBoard = Nothing

'Return the value
ClipBoardGetData = strData
End Function


Sunday, January 15, 2012

SlideMyPics - Slideshow your photos for free..


Would you like to show your images as a Slideshow? Well you can try SlideMyPics. Its a simple free application which will pull your photos that are already online such as Facebook, Picasa and create an awesome slideshow that you can easily share in your blog. 
It generates HTML5 slideshows that you can veiw on any browser, including smartphones and tablets.


How to add photos:
SlideMyPics will work with photos that are already uploaded in Facebook, Flickr, Picasa, Photobucket and SmumMug. You don't need to register for SlideMyPics, just login to any of these sites and SlideMyPics will allow you to select the specific album and import into slideshow.


Organize your photos:
Once the album is selected, you can easily move or delete the photos.


Configure:
You can choose different size, template and you can add music too.


Share:
Finally you can share your slideshow on your blog, site, Facebook or twitter by copying the embedded URL or by selecting FB and twitter link.




Friday, January 6, 2012

How to hold a digital camera...

Do you want to know how to hold a digital camera...Here is the tips for you..

Freebies | Free Icon set..

HTML5 Cheat Sheets..

HTML5 Cheat Sheet - Tags

HTML5 Cheat Sheet - Tags
HTML5 Cheat Sheet By InMotion Hosting - A Virtual Private Servers Provider

HTML 5 Cheat Sheet - Event Handler Attributes

HTML5 Cheat Sheet - Event Handler Attributes
HTML5 Cheat Sheet By InMotion Hosting - A Web Hosting Provider

HTML5 Cheat Sheet - Browser Support

HTML5 Cheat Sheet - Browser Support
HTML5 Cheat Sheet By InMotion Hosting - A Dedicated Server Provider

Thursday, January 5, 2012

Useful Sites to send large files..

Senduit
Easy way to send large files (up to 100MB) without dealing with registration and other typical road blocks. You simply upload a file and get a private URL that lasts for a certain time period (up to 1 week). You can then send this private URL to its intended recipient via any communication channel.

GigaSize
Send large files to anyone, up to 1GB in size. Files sent will be available for up to 45 days.

FileFactory

Another large file transfer service. Upload files of up to 500MB each, and email the link to the recipient. Files will be automatically removed if there is no download after 15 days.


Mail Big File

Send large files to anyone, up to 1GB in size. Files sent will be available for up to 7 days, or a maximum of 3 downloads.


YouSendIt

Send large files (up to 1GB) via email. Files are uploaded to the server and kept for 7 days. Recipients will be sent an email with instructions for download.


SendThisFile
Send large files (unlimited) via email. Files are uploaded to the server and kept for 3 days. Recipients will be sent an email with instructions for download.

attachmore

Upload, send and share more with Attachmore. Share photos, videos, documents, recordings and other large files with family, friends and associates. Send all these files simply through your email, instant messages or social networking sites. Attachmore provides a 100MB account for free to all those in need of file delivery.

TransferBigFiles
TransferBigFiles.com makes it very easy to send and share large files that are generally too big to email. It does this by allowing you to upload your file to their servers and it sends a link to a page where the file can then be retrieved by your recipient (or yourself if you are the recipient).

Sunday, January 1, 2012

Share Files & Links with CloudApp

CloudApp is a file sharing app that allows you to share images, links, music, videos and files. Once you upload a file, you’re provided with a link that you can send to anyone.

It supports two accounts, either free or paid. In free account you can upload 10 files daily and a max file size of 25MB. The paid account will allow unlimited daily uploads, a 250MB max file size, and you can add customer domain too.

How to upload file:

Once you created an account, you can start uploading your files and links.
To add a file, click the word “File” under the form field to add a bookmark and it will change to an uploader. Select the file you want to upload (only one at a time), and upload it.


Sharing Links
Once you add a link or a file, it’s assigned a custom link you can use for sharing. There are two types of links: public and private. The difference is that the “private” links use a longer key that is harder to guess than the public ones.
Deleting Drops
In order to delete a drop, you need to click the checkbox associated with the drop, then click the delete button at the top of the page. This is nice when you want to delete several drops at once.