javascript - Need help in -invoking application Automatically out of many -
here test automation scenario: have application running in 3 environments- test, int , prod. have each of app running against different point of sales(i.e. pos) like- uk, us, german, itali. invoking application in cucumber-selenium suite, have 1st forma url specifying base url+pos+environment+dates in local format based on pos..which seems tedious , time consuming approach.
so want keep hardcoded urls stored in static final variables each pos environment. , want use these variables called per environment , pos value passed parameter during run time of cucumber data set script. have formed attached in image-
now i'm planning have selenium function open url - public void opensearchpage(string strpos)
in function if use- if else getting nasty. wanted use switch case statement below, based on app value passed parameterised in argument i.e. strpos:
i tried writing below getting compile errors- expression expected @ switch level , can not resolve symbol 'uk_test' @ case level.
i'm attaching image of code unable post question bcz of error formatting keep prompted.. static final var , switch case code
so need on below 2 questions- q1. how rid off above errors? q2. switch case approach i'm thinking use best scenario or can use else better option plz suggest..?
Comments
Post a Comment