- a71688Regular Participant
- Posts : 27
Join date : 2014-07-23
Multiple condtions selenium ide help needed
Fri May 22, 2015 6:35 pm
Hi
I have following problem
If host is like PP or ig then jump to label test. It seems it is giving me problems.
storeValue
environment
host
I tried
gotoIf
(storedVars.host != "pp" || storedVars.host != "ig")
test
What am I doing wrong ?
I have following problem
If host is like PP or ig then jump to label test. It seems it is giving me problems.
I tried
What am I doing wrong ?
- ccoxMaster
- Posts : 205
Join date : 2012-01-06
Age : 39
Location : Denver, CO
Re: Multiple condtions selenium ide help needed
Wed May 27, 2015 4:58 am
First, what is the problem, i.e. is there an error, does the condition always return true? Second,what are you storing? Try echo | ${host} after your first command and see what the result is.
I would change out your gotoif with a getEval command and update a variable. Set that variable to the name of the label you want to go to.
store | 0 | labelName
getEval | if(storedVars.host!='pp' || stordVars.host!='ig'){storedVars.labelName="true"} else {storedVars.labelName="false"};
goto | ${labelName}
label | true
label | false
I would change out your gotoif with a getEval command and update a variable. Set that variable to the name of the label you want to go to.
store | 0 | labelName
getEval | if(storedVars.host!='pp' || stordVars.host!='ig'){storedVars.labelName="true"} else {storedVars.labelName="false"};
goto | ${labelName}
label | true
label | false
- a71688Regular Participant
- Posts : 27
Join date : 2014-07-23
Re: Multiple condtions selenium ide help needed
Wed May 27, 2015 9:10 pm
Hi CCOX
I will try to make my question clear what I want, by sumbitting my code. Values are read from my inputfile.
Then I want that if environment is different from PP or IG then it should jump to label test, but there seems to be an error since that if my env. is PP or IG it just jumps to label test. What am I doing wrong ?
Code shown below (buttom)
New Test
I will try to make my question clear what I want, by sumbitting my code. Values are read from my inputfile.
Then I want that if environment is different from PP or IG then it should jump to label test, but there seems to be an error since that if my env. is PP or IG it just jumps to label test. What am I doing wrong ?
Code shown below (buttom)
New Test | ||
storeValue | cvr2 | cvr2 |
storeValue | cvr | cvr |
storeValue | firstmiddlename | firstmiddlename |
storeValue | lastname | lastname |
storeValue | simulator | simulatorenviorment |
storeValue | Testtool | Testtool |
storeValue | testtool | testtool |
storeValue | ||
storeValue | environment | host |
storeValue | chktesttool | chktesttool |
storeValue | DANID | DANID |
storeValue | RID | RID |
storeValue | POCES | POCES |
storeValue | ATB | ATB |
storeValue | Baseurl | baseurl |
storeValue | ATBH | ATBH |
storeValue | Erhvervsportal | Erhvervsportal |
storeValue | Danidadm | Danidadm |
storeValue | RIDH | RIDH |
storeValue | NOF | NOF |
store | OCtmltp16tsvkbtt | captcha |
gotoIf | storedVars.host!='pp' || storedVars.host!='ig' | test |
open | ${ATBH} | |
waitForText | css=pre | All is well https://localhost:9292/attributeservice_serviceprovider_server/: All is well |
verifyText | css=pre | All is well https://localhost:9292/attributeservice_serviceprovider_server/: All is well |
open | ${Erhvervsportal} | |
waitForText | css=pre | All is well https://vz2mapp:9290/eo2_selfservice_webservice/: All is well https://localhost:9292/attributeservice_serviceprovider_server/: All is well https://localhost:9298/rid_ca_server/: All is well |
verifyText | css=pre | All is well https://vz2mapp:9290/eo2_selfservice_webservice/: All is well https://localhost:9292/attributeservice_serviceprovider_server/: All is well https://localhost:9298/rid_ca_server/: All is well |
open | ${Danidadm} | |
waitForText | css=html | All is well https://localhost:9292/attributeservice_serviceprovider_server/: All is well TCP check http://ibss:8085 :true |
verifyText | css=pre | All is well https://localhost:9292/attributeservice_serviceprovider_server/: All is well TCP check http://ibss:8085 :true |
open | ${RIDH} | |
waitForText | css=pre | All is well |
verifyText | css=pre | All is well |
open | ${NOF} | |
waitForText | css=pre | All is well |
verifyText | css=pre | All is well |
label | test | |
open | ${DANID} | |
waitForPageToLoad | 30000 | |
storeTextPresent | NemID-administration og telefon-support | Logon |
gotoIf | storedVars.Logon | true |
getEval | alert("Du skal logge på DanID adm igen") | |
break | ||
echo | MANUAL STEP - TO DO | Login med TESTMOCES3 / PW: Test1234 |
label | true | |
clickAndWait | link=Søg virksomhed | |
type | id=cvr | ${cvr2} |
clickAndWait | css=input[type="submit"] | |
storeTextPresent | Aktiv | cvrStore1 |
gotoIf | !storedVars.cvrStore1 | true |
getEval | alert("CVR "+${cvr2}+" er allerede i brug - find et andet og start forfra med INPUT filen.") | |
label | true | |
clickAndWait | link=Forside | |
clickAndWait | link=Søg virksomhed | |
type | id=cvr | ${cvr} |
clickAndWait | css=input[type="submit"] | |
storeTextPresent | Aktiv | cvrStore2 |
gotoIf | !storedVars.cvrStore2 | OK |
getEval | alert("CVR "+${cvr}+" er allerede i brug - find et andet og start forfra med INPUT filen.") | |
label | OK |
- a71688Regular Participant
- Posts : 27
Join date : 2014-07-23
Re: Multiple condtions selenium ide help needed
Thu May 28, 2015 11:46 pm
You can use ccox solution that also Works or use following:
gotoif | !(storedVars.host=='pp' || storedVars.host=='ig')|test
gotoif | !(storedVars.host=='pp' || storedVars.host=='ig')|test
Permissions in this forum:
You cannot reply to topics in this forum
|
|