Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Parameterizing Webedit, WebButton, etc
#1
Solved: 11 Years, 4 Months ago
Hello,
The goal is to make the scripts as robust as possible.
We plan to use this in our Testing env, where code is pushed/changed everyday.

Here is a simple scenario:

Login Screen:

it has any entry for email address and password:
I know that the user entry can be parametrized by data table.

What about the properties of these text boxes.
ex:

Code:
Browser("Login").Page("Login").WebEdit("_email").Set "user1@test.com"
Browser("Login").Page("Login").WebEdit("_password").SetSecure "Password"

Is there a way to parametrize " webedit("_Email") "

If my programmer decides to change the name/property of the textbox, how can i handle this so the script doesnt break?

Please advise.

Thanks,
Rd
Reply
#2
Solved: 11 Years, 4 Months ago
Hi,
For the first question "Is there a way to parametrize " webedit("_Email") "

I can you give the better solution put all the emails in excel in first column
1. Create the test data i.e, excel with the required input and output
2. Import the datatable using datatable.import
3.eml=datatable.value(1,1)
pwd=datatable.value(2,1)
4. datatable.getrocount and use the loop like (lets say row count=4)
Code:
for i=1 to 4 step 1
datatable.setcurrentrow(1)
Browser("Login").Page("Login").WebEdit("_email").Set eml
Browser("Login").Page("Login").WebEdit"_password").Set pwd
Next

this is the way u can parametrize the things and then for the second question
"If my programmer decides to change the name/property of the textbox, how can i handle this so the script doesnt break?"

It would be better by changing the name and proprties in the script (ctrl+R and replace the new names and properties)
Make sure that u have to write the descriptive programing for the webedit i.e email and password then only u could change the names and properties else
if you proceed with the OR definetly u have change the title and properties in the OR too......
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Not able to click on webbutton Zalavadia86 3 2,285 10-24-2016, 11:32 PM
Last Post: frebuffi
  Cannot find the "[ WebButton ]" object's parent "[ Page ]" (class Page) sumitparolkar@gmail.com 4 5,077 05-03-2013, 11:53 PM
Last Post: agarwl.anurag
  Not Able to Click on a webbutton silpavinod 6 4,848 10-17-2012, 12:09 AM
Last Post: agarwl.anurag
  verying Text in WebButton Meghana1 2 2,297 08-08-2012, 05:58 PM
Last Post: Ankesh
  Presence of WebLink and Webbutton hamzaz 1 2,222 07-29-2012, 03:49 PM
Last Post: sree.85

Forum Jump:


Users browsing this thread: 1 Guest(s)