Based on the browser selected for execution I need a particular block of code to be executed.

I have a typical scenario, based on the browser selected for execution I need a particular block of code to be executed.

If browser is IE … execute a particular block of code.
If browser is Firefox … execute a particular block of code.
If browser is **Chrome **…execute a particular block of code.

Thanks for looking into this.

On the run dropdown you choose what browser you use. I would set up separate tests for each browser and store them in separate folders.

If you are doing this inside of the test somehow I would set up a variable for browser and if statements around your blocks of code:

browser = ‘whateveryouaredoing’

if(browser = ‘firefox’) {
block of code
}

else if(browser = ‘chrome’) {
block of code
}