Something I learned very recently. Have you ever written code which involved file path's? If yes then this post might be helpful...Even otherwise knowing something unknown or brushing up concepts known won't hurt - would they? :) So here I go, I have my Selenium Scripts which might run on both Linux and Windows machines. I don't store my test files on a central location which can be accessed over the network/internet, so when my script runs on a Linux machine it would look locally on the linux file system for the test files. Same is the case when I run my tests on Windows. Here is what I used to do :) My Initial Approach: If ( Test_Running_On_Linux ){ return System . getProperty ( "user.dir" ) + "/" + TestProperties . strFilePathPart1 + "/"+ TestProperties.strFilePathPart2; } else if( Test_Running_On_Windows ){ return System . getProperty ( "user.dir" ) + "\\" + TestProperties . strFilePathPa...
Being in the industry for almost two decades, one thing that's been constant is change and my curiosity. I In this fast world of IT...being curious, learning and learning by doing is quintessential :) Here is my way of learning and sharing what I learnt!!! Author: Sirisha Reddy G V