how to check if a colmmande return is true or false selenium-ide - web

I'm trying to get a command return with selenium ide by doing it :
storeTextPresent|myText|title
gotoIf|storedVars.tite|true
echo|${"true"}
but it doesnt work...i have : [error] Unexpected Exception: fileName -> chrome://flowcontrol/content/extensions/goto-sel-ide.js?1347871647495, lineNumber -> 120.
Does anybody know how to get the return?
Thank you

I didn't check for boolean support on gotoIf, but if gotoIf wants to go to a label, I don't see a label defined in the above script.
Also, the "storedVars.tite" reference looks to be misspelled.

Related

Python eval is not working as a string how to use with shell code

I have a function like svn_check which basically check brnach in svn function is given below
def svn_check(request):
url ='eval `/volume/tools/bin/ssh-agent.sh`;printenv;ssh-add -l;/volume/tools/bin/svn info svn+ssh://cng-svn.tema.net/my-2009/branches/NEHA_NEGI'
output, message = subprocess.getstatusoutput(url)
print("CMD : " + str(url))
print("Message : " + str(message))
print("Return Code : " + str(output_br))
return HttpResponse(output_br)
i also have a branch with name NEHA_NEGI. but when i am executing this function it is returning me the error i dont know why it is returning me the error.
CMD : 'eval /volume/tools/bin/ssh-agent.sh;printenv;ssh-add -l;/volume/tools/bin/svn info svn+ssh://cng-svn.tema.net/my-2009/branches/NEHA_NEGI', referer: http://my-site.com:81/
Message : NOTE: ssh-agent is empty; use ssh-add to load your key(s)!, referer: http://my-site.com:81/
Return Code : 1, referer: http://my-site.com:81/
I am getting this in the error log. can anyone please help me relate this why I am getting this error? thanks in advance I am a newbie in shell language.
Or maybe it is happening because eval function is treated as a string. so there s any other way to type so eval can run properly.

sqlalchemy.exc.DataError: (psycopg2.errors.InvalidTextRepresentation) invalid input syntax for type boolean: "sdzf"

I'm making a function in my e-commerce website which updates credentials of a user. whenever my form triggers this function I get the error -> sqlalchemy.exc.DataError: (psycopg2.errors.InvalidTextRepresentation) invalid input syntax for type boolean: "sdzf"
I'm unable to find out what's wrong. Please help me find the issue. Thanks in advance.
python code:
#app.route("/admin_cred_update", methods=["POST","GET"])
def admin_cred_update():
email=str(request.form.get("email"))
password=str(request.form.get("password"))
if re.search("[.,*/%$#:|\[\]\(\)]",email) and re.search("[.,*/%$#:|\[\]\(\)]",password):
message="there are some invalid characters in above fields"
return render_template("admin_profile.html", updatemes=message)
else:
db.execute("update admin_master_tbl SET email=:email and password=:password where email=:smail and password=:spassword",{"email":email,"password":password,"smail":session["adminname"],"spassword":session["adminpassword"]})
session["adminname"]=email
session["adminpassword"]=password
message1="credentials updated succesfully"
return render_template("admin_profile.html", updatemes=message1)
error log:
sqlalchemy.exc.DataError: (psycopg2.errors.InvalidTextRepresentation) invalid input syntax for type boolean: "sdzf"
LINE 1: update admin_master_tbl SET email='sdzf' and password='csadf...
^
[SQL: update admin_master_tbl SET email=%(email)s and password=%(password)s where email=%(smail)s and password=%(spassword)s]
[parameters: {'email': 'sdzf', 'password': 'csadfc', 'smail': 'lightningdrago72#gmail.com', 'spassword': 'asdf'}]
Oh I found the problem!!. I did the mistake of putting and instead of , in the SET part of my query. Now the problem is solved!!.

terraform 11 and "concat" function: parse error

TF v.0.11 (I know it is old but I need this one)
I try to configure output this way:
value = "${concat(aws_lambda_function.lambda.*.arn, [""])}"
The error message is
Error reading config for output FUNCTION_ARN: parse error at 1:46 :
expected expression but found "["
What am I doing wrong, how to fix that?
Reason: [""] don't work for v11.
Solution:
value = "${element(concat(aws_lambda_function.lambda.*.arn, list("")), 0)}"

Problem with billing_agreement.cancel(). ('cancel() missing 1 required positional argument: 'attributes')

SDK/Library version: 1.13.1
Environment: Sandbox
PayPal-Debug-ID values: None
Language, the language version, and OS: Python, Ubuntu
Issue description:
I'm getting the following error when I try to cancel a billing agreement.
The error:
TypeError: cancel() missing 1 required positional argument: 'attributes'
My code:
billing_agreement = BillingAgreement.find(billing_id)
if billing_agreement.cancel():
print(billing_agreement)
else:
flash('We are having some difficulties canceling your subscription, please try again later.', 'fails')
return redirect(url_for('settings.settingspage'))
I'm getting the error because I need something in the attribute's value but I don't know what should I assign to the variable.
GitHub issue: https://github.com/paypal/PayPal-Python-SDK/issues/297
After some digging and looking at the documentation samples I found a sample about the cancel option and what I needed to assign to the attribute value was a cancel_note.
The code:
cancel_note = {"note": "Canceling the agreement"}
user = Users.query.filter_by(id=ID).first()
billing_id = Subscriptions.query.filter_by(email=user.email).filter_by(active=1).first().order_id
billing_agreement = BillingAgreement.find(billing_id)
if billing_agreement.cancel(cancel_note):
flash('Subscription canceled with success.', 'success')
return redirect(url_for('settings.settingspage'))
else:
flash('We are having some difficulties canceling your subscription, please try again later.', 'fails')
return redirect(url_for('settings.settingspage'))
The documentation sample

Invalid Syntax for PEP-8

I'm receiving a notification that advised the below script is not PEP-8:
example_var = print('whoa')
Output:
[E] invalid syntax.
It's showing that the error is a result of the first parentheses in the print statement, but nothing looks off to me.
example_var = print('whoa')
example_var

Resources