As usual awesome video. I think people should like,comment,share and subscribe this channel. I don't know why some people dislike this video. Really apprecite your effort Naveen. Thanks
Hi Naveen, can it not be called a key word driven framework where we are using key and value pairs? or hybrid where we are also driving the data (Data driven) plus kyword driven
Thanks Naveen Video is Very Helpful. Can we use the same technique with FindBy instead of driver.FindElement as the same you have explained in Framework Design Video.Please suggest
Naveen good video explanation - please make one correction - "FileInputStream" class available in java.io package but in video you said java.util package. Thanks
Hi Naveen, I am getting this while trying to fetch Xpath value from config file in my script.Kindly help me in sorting this ot Exception in thread "main" java.lang.IllegalArgumentException: Cannot find elements when the XPath is null. at org.openqa.selenium.By$ByXPath.(By.java:339) at org.openqa.selenium.By.xpath(By.java:92) at Demo.RatingCenterLogin.main(RatingCenterLogin.java:73)
You made your readproperty dynamic. Can you please tell me how to do this in step defination, i am using static data in my step defination. It would be great if i can use dynamic data in step defination
i didn't get your question i guess i understand you are trying to say having multiple set of data which you can You can store int, string , WebElement as string Hope i have answered ur query
Hi Naveen, Even after deleting the config file, I am able to load config.properties. Also, even after updating values in config file, old values are fetched. Please help.
It's simple, you just need to change the value of "browser" property in config.properties file. sample code here: String browserName = prop.getProperty("browser"); System.out.println(browserName); if (browserName.equals("chrome")) { System.setProperty("webdriver.chrome.driver", "/Users/naveenkhunteta/Downloads/chromedriver"); driver = new ChromeDriver(); // launch chrome } else if(browserName.equals("FF")){ System.setProperty("webdriver.chrome.driver", "/Users/naveenkhunteta/Downloads/geckodriver"); driver = new FirefoxDriver(); } else if(browserName.equals("saucelabs")){ //if browser property is equal to "saucelabs" in config.properties file public static final String USERNAME = "YOUR_USERNAME"; public static final String ACCESS_KEY = "YOUR_ACCESS_KEY"; public static final String URL = "" + USERNAME + ":" + ACCESS_KEY +"@ondemand.saucelabs.com:80/wd/hub"; DesiredCapabilities caps = DesiredCapabilities.chrome(); caps.setCapability("platform", "Windows XP"); caps.setCapability("version", "43.0"); driver = new RemoteWebDriver(new URL(URL), caps); } driver.get("www.google.com");
Sure Aditya. Desired capabilities will be covered during Grid sessions. For your knowledge point of view Desired capabilities are always used when you want to run test cases remotely like on VMs/SauceLabs/BrowserStack etc.. Browser based classes are used when you need to run test cases locally.
subscribe my channel for more Selenium-Java videos.
th-cam.com/channels/XJKOPxx4O1f63nnfsoiEug.html?view_as=subscriber
Hi Naveen, Your videos are very informative and anyone can learn from them. Thank you for such awesome tuterials.
Thanks for watching
Very very informative session Naveen. Keep it up and Thank you.
As usual awesome video. I think people should like,comment,share and subscribe this channel. I don't know why some people dislike this video. Really apprecite your effort Naveen. Thanks
Thank you so much.... you have earned a new fan sir...
Thanks alot for all your efforts it helps me a lot
Thank you so much Naveen!! 🙏
hi Naveen
It is necessary to keep the config.properties file in the folder can I put that file in our desktop or some other location?
@NaveenAutomationlab we also create Constants classes too.Both are used for same purpose??
Thank You, Sir!
Very informative videos.. but i have one question we use data driven also so why we need this concept
Naveen, can you please explain how to select values from span drop down ?
Hello Naveen, Can I write properties file without main() method??
is config.properties and desired capabilities same things?
Hi naveen if at run time if want to check if the xpath is not working try using css how can we implement this?
👍Thank you Naveen.
Hi Naveen, can it not be called a key word driven framework where we are using key and value pairs? or hybrid where we are also driving the data (Data driven) plus kyword driven
Naveen your videos are very helpful :)
Hi Naveen,
I am getting null pointer exception for driver.get(URL); statement..can you please help how to resolve?
I have one query. The key part in the config.properties file will always be same or it can be changed?
Thanks Naveen Video is Very Helpful.
Can we use the same technique with FindBy instead of driver.FindElement as the same you have explained in Framework Design Video.Please suggest
Good Explanation 👍👍
Hi Naveen
Make a video on "How to open link in new tab" using selenium.
plz do this
Can we use the seprate properties files for seprate web pages
Hi Naveen, when I run above script I am getting Null as a result. Can you plz help me where I am doing wrong
Naveen good video explanation - please make one correction - "FileInputStream" class available in java.io package but in video you said java.util package. Thanks
Hi Naveen,
I am getting this while trying to fetch Xpath value from config file in my script.Kindly help me in sorting this ot
Exception in thread "main" java.lang.IllegalArgumentException: Cannot find elements when the XPath is null.
at org.openqa.selenium.By$ByXPath.(By.java:339)
at org.openqa.selenium.By.xpath(By.java:92)
at Demo.RatingCenterLogin.main(RatingCenterLogin.java:73)
You made your readproperty dynamic. Can you please tell me how to do this in step defination, i am using static data in my step defination. It would be great if i can use dynamic data in step defination
how to use properties file to test multiple set of data for same page? Or is it mainly used as Object repository?
i didn't get your question i guess
i understand you are trying to say having multiple set of data which you can
You can store int, string , WebElement as string
Hope i have answered ur query
Hi Naveen,
Even after deleting the config file, I am able to load config.properties. Also, even after updating values in config file, old values are fetched. Please help.
i think you are loading the file from another project must be some setup issue
Thanks solve my problem
Hi Naveen, I am getting NullPointerException. I am using the same code still. Can you please tell me how to make it work
Mail me ur code at naveenanimation20@gmail.com
@@naveenautomationlabs Mailed you the code. Please check. Thanks for your time :)
God Bless You..
@Naveen AutomationLabs : Can you tell how we can use properties file to run local and sauce labs execution?
It's simple, you just need to change the value of "browser" property in config.properties file. sample code here:
String browserName = prop.getProperty("browser");
System.out.println(browserName);
if (browserName.equals("chrome")) {
System.setProperty("webdriver.chrome.driver", "/Users/naveenkhunteta/Downloads/chromedriver");
driver = new ChromeDriver(); // launch chrome
}
else if(browserName.equals("FF")){
System.setProperty("webdriver.chrome.driver", "/Users/naveenkhunteta/Downloads/geckodriver");
driver = new FirefoxDriver();
}
else if(browserName.equals("saucelabs")){ //if browser property is equal to "saucelabs" in config.properties file
public static final String USERNAME = "YOUR_USERNAME";
public static final String ACCESS_KEY = "YOUR_ACCESS_KEY";
public static final String URL = "" + USERNAME + ":" + ACCESS_KEY
+"@ondemand.saucelabs.com:80/wd/hub";
DesiredCapabilities caps = DesiredCapabilities.chrome();
caps.setCapability("platform", "Windows XP");
caps.setCapability("version", "43.0");
driver = new RemoteWebDriver(new URL(URL), caps);
}
driver.get("www.google.com");
Thanks :)
Also please make a video on Desired capabilities and option class of browser. When to use which one. And what is the diff between them.
Sure Aditya. Desired capabilities will be covered during Grid sessions. For your knowledge point of view Desired capabilities are always used when you want to run test cases remotely like on VMs/SauceLabs/BrowserStack etc.. Browser based classes are used when you need to run test cases locally.
Thank you very much!
nice exactly i was need
Thank you so much :)
Thanks. 👍
Welcome 👍
1.25 speed is good
Thank you so much :)