Forum Discussion
Or MarshaR would this be simpler somehow to deploy?
Sincerely,
Todd
So I went ahead and built three steps into my keyword test script
The Unit2 script runs by itself just fine but when it executes within the entire keyword script it gives me an exception. Why? My thought was I have the time format working well. I can place the lastname in a variable project wide now and I initialized it with a starter value just fine by setting the default value. All I want to do is run the code snippet Project.Variables.LastName + Unit2 Can't that be done?
Sincerely,
Todd2
- todd22 years agoContributor
Works great! Now I just need to add that last name that is in the Variable for the project at the moment the script runs to the front of this output as one big string and we are good to go. What could I be missing?
Thanks,
Todd2
- todd22 years agoContributor
Team: This code now works as a Unit script
from datetime import datetime
def ContatenationString():
Lastname = "America"
now = datetime.now()
current_time = now.strftime("%H%M%S")
UpdatedLastname = Lastname+current_time
Log.Message(UpdatedLastname)
ContatenationString()
But when the keyword test script executes and the lastname on the form approaches, the name America prints but not UpdatedLastname. What do we got to do to make the lastname text box print the UpdatedLastname value? The keyword test steps have been modified as well as indicated below.
Thank you,
Todd2
Related Content
- 13 years ago
Recent Discussions
- 3 hours ago
- 20 hours ago