12-04-2009, 11:17 AM
Hey can anybody help me urgent !!!!
Here are my if and else statements listed:
Logic is this: If preferred coom is Email : Fill Email field else if preferred comm is Phone : Fill Phone Filed else fill fax field.
My problem: Weblist - Preferred comm is always defaulted to "Email". So first time when I run the script First If statment should be true and execute immediate next statement. But inreturn execution goes to the Elseif statement and since elseif is also false last statmemt is excecuted. Implies Fax field is filled. Also noticed that after the elseif statement execution Preferred comm was set to Phone????
Here are my if and else statements listed:
Code:
If Browser("TalonPro Solutions").Page("TalonPro Solutions_4").WebList("ctl00$ContentPlaceHolder1$ddlP").Select ("Email") = True Then
Browser("TalonPro Solutions").Page("TalonPro Solutions_4").WebEdit("ctl00$ContentPlaceHolder1$txtE").Set "swetha.b@osmosys.asia"
Elseif Browser("TalonPro Solutions").Page("TalonPro Solutions_4").WebList("ctl00$ContentPlaceHolder1$ddlP").Select ("Phone") = True Then
Browser("TalonPro Solutions").Page("TalonPro Solutions_4").WebEdit("ctl00$ContentPlaceHolder1$txtM").Set "(987)789-4563"
Else Browser("TalonPro Solutions").Page("TalonPro Solutions_4").WebEdit("ctl00$ContentPlaceHolder1$txtF").Set "(876)567-3456"
End if
Logic is this: If preferred coom is Email : Fill Email field else if preferred comm is Phone : Fill Phone Filed else fill fax field.
My problem: Weblist - Preferred comm is always defaulted to "Email". So first time when I run the script First If statment should be true and execute immediate next statement. But inreturn execution goes to the Elseif statement and since elseif is also false last statmemt is excecuted. Implies Fax field is filled. Also noticed that after the elseif statement execution Preferred comm was set to Phone????