Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» FlexMonkium Download Not available under Gorillalogic site
Thu Dec 08, 2016 5:40 pm by bhanu.praveen

» Selenium Script issue
Tue Dec 06, 2016 9:48 pm by njain213

» Difference between QTP, Selenium and Silk test
Tue Dec 06, 2016 7:58 pm by jessicacyrus1

» Where does selenium script pick browser from
Tue Dec 06, 2016 1:52 pm by janbaskt

» Safari throws an HTTP ERROR: 404
Tue Dec 06, 2016 1:51 pm by janbaskt

» Access Denied Error in Selenium RC
Tue Dec 06, 2016 1:51 pm by janbaskt

» Automating Flex application through selenium webdriver
Fri Dec 02, 2016 2:06 pm by abhinay.krs

» Starting with Selenium, what is Selenium?
Mon Nov 28, 2016 4:00 pm by Foma

» Getting started with Selenium
Mon Nov 28, 2016 3:23 pm by Rebbelx

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Multiple condtions selenium ide help needed

View previous topic View next topic Go down

Multiple condtions selenium ide help needed

Post by a71688 on 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 ?

a71688
Regular Participant
Regular Participant

Posts : 27
Join date : 2014-07-23

Back to top Go down

Re: Multiple condtions selenium ide help needed

Post by ccox on 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

ccox
Master
Master

Posts : 205
Join date : 2012-01-06
Age : 31
Location : Denver, CO

Back to top Go down

Re: Multiple condtions selenium ide help needed

Post by a71688 on 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





























































































































































































































































































































New Test
storeValuecvr2cvr2
storeValuecvrcvr
storeValuefirstmiddlenamefirstmiddlename
storeValuelastnamelastname
storeValuesimulatorsimulatorenviorment
storeValueTesttoolTesttool
storeValuetesttooltesttool
storeValuemailmail
storeValueenvironmenthost
storeValuechktesttoolchktesttool
storeValueDANIDDANID
storeValueRIDRID
storeValuePOCESPOCES
storeValueATBATB
storeValueBaseurlbaseurl
storeValueATBHATBH
storeValueErhvervsportalErhvervsportal
storeValueDanidadmDanidadm
storeValueRIDHRIDH
storeValueNOFNOF
storeOCtmltp16tsvkbttcaptcha
gotoIfstoredVars.host!='pp' || storedVars.host!='ig'test
open${ATBH}
waitForTextcss=preAll is well
https://localhost:9292/attributeservice_serviceprovider_server/:
All is well
verifyTextcss=preAll is well
https://localhost:9292/attributeservice_serviceprovider_server/:
All is well
open${Erhvervsportal}
waitForTextcss=preAll 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
verifyTextcss=preAll 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}
waitForTextcss=htmlAll is well
https://localhost:9292/attributeservice_serviceprovider_server/:
All is well
TCP check http://ibss:8085 :true
verifyTextcss=preAll is well
https://localhost:9292/attributeservice_serviceprovider_server/:
All is well
TCP check http://ibss:8085 :true
open${RIDH}
waitForTextcss=preAll is well
verifyTextcss=preAll is well
open${NOF}
waitForTextcss=preAll is well
verifyTextcss=preAll is well
labeltest
open${DANID}
waitForPageToLoad30000
storeTextPresentNemID-administration og telefon-supportLogon
gotoIfstoredVars.Logontrue
getEvalalert("Du skal logge på DanID adm igen")
break
echoMANUAL STEP - TO DOLogin med TESTMOCES3 / PW: Test1234
labeltrue
clickAndWaitlink=Søg virksomhed
typeid=cvr${cvr2}
clickAndWaitcss=input[type="submit"]
storeTextPresentAktivcvrStore1
gotoIf!storedVars.cvrStore1true
getEvalalert("CVR "+${cvr2}+" er allerede i brug - find et andet og start forfra med INPUT filen.")
labeltrue
clickAndWaitlink=Forside
clickAndWaitlink=Søg virksomhed
typeid=cvr${cvr}
clickAndWaitcss=input[type="submit"]
storeTextPresentAktivcvrStore2
gotoIf!storedVars.cvrStore2OK
getEvalalert("CVR "+${cvr}+" er allerede i brug - find et andet og start forfra med INPUT filen.")
labelOK


a71688
Regular Participant
Regular Participant

Posts : 27
Join date : 2014-07-23

Back to top Go down

Re: Multiple condtions selenium ide help needed

Post by a71688 on 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

a71688
Regular Participant
Regular Participant

Posts : 27
Join date : 2014-07-23

Back to top Go down

Re: Multiple condtions selenium ide help needed

Post by Sponsored content Today at 3:52 pm


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum