Handle Calendar in Selenium WebDriver - Session - 16

  Рет қаралды 106,375

Naveen AutomationLabs

Naveen AutomationLabs

Күн бұрын

Пікірлер: 86
@omkarpotdar2763
@omkarpotdar2763 2 жыл бұрын
Thanks a lot Naveen for providing very good and easy solution for handling calendar. Really your videos are very useful in point of project work as well as interview purpose. Really appreciated your headwork.
@vithleshkumargupta
@vithleshkumargupta 5 жыл бұрын
Hi Naveen , There is one mistake so please put that in description - catch(NoSuchElementException e){ System.out.println("Please enter the correct date value); flag=false; // Should be flag = true , Mistake here , It should be set to true to break outer loop break ; } Thanks for the amazing content.
@anshidance3279
@anshidance3279 4 жыл бұрын
Thank you sir for your Explanation.The way you explaining i like it very much.I never seen this type of explanation
@raunakgupta3746
@raunakgupta3746 4 жыл бұрын
Thank you @naveen for such amazing content, i have learned selenium through your youtube channel......Thank you once again.👍
@EliasHossein799
@EliasHossein799 3 жыл бұрын
So Excellent tutorial !!! you are the super hero !!!
@sandeepkokane9549
@sandeepkokane9549 3 жыл бұрын
Thanks Naveen. Very nice video on calender
@Nitsng
@Nitsng 6 жыл бұрын
Thanks a lot for this video Naveen. if you don't mind, I have one suggestion . For videos like this, it will be good if you can show how it looks while debugging and how value of variables are changing, it would help in understanding. I appreciate your efforts from the bottom of my heart .
@prakashvish3988
@prakashvish3988 3 жыл бұрын
Very useful ❤️ thanks naveen ❤️
@aadiandadvikvlogs
@aadiandadvikvlogs 4 жыл бұрын
Well explained Naveen as usual. Thank you so much. You are the best !!
@deepaknarang6190
@deepaknarang6190 7 жыл бұрын
Hi Naveen , very good explanation . i have one suggestion instead of flag you should use below code to break outerlook outerloop: for (int i=0; i < 5; i++) { for (int j=0; j < 5; j++) { if (i * j > 6) { System.out.println("Breaking"); break outerloop; } System.out.println(i + " " + j); } } System.out.println("Done");
@naveenautomationlabs
@naveenautomationlabs 7 жыл бұрын
thanks for suggestion but I dint get you code. can u plz take the same calendar example and implement ur logic accordingly
@shakshisingh1001
@shakshisingh1001 5 жыл бұрын
Hi Naveen, Thanks for the Java and selenium videos. It's very helpful. Do you any c# tutorial video. Can you please share c# tutorial video link if you have.
@rajalakshmis201
@rajalakshmis201 5 жыл бұрын
Thank you Sir, clearly explained..
@kirthinimal3062
@kirthinimal3062 5 жыл бұрын
Hi Naveen, This freecrm website is now been updated , im unable to click on the Calendar link , as i can see there no frame in there. i tired to inspect the same . but no luck. could you please help me on this. thanks
@Siva-en9sw
@Siva-en9sw 5 жыл бұрын
Excellent boss thank you
@manishaneharkar2009
@manishaneharkar2009 3 жыл бұрын
Very Nicely explained, i am glad that i have seen your channel and going through it , but application which you are using ie CRM site seems changed a lot , so not able to simulate into practice... can you please provide alternate site for same. Thanks in advance.
@tejasb2104
@tejasb2104 2 жыл бұрын
The site used above is changed to "classic.freecrm.com". It was a bit difficult to find out, but luckily got it. You might not be practising now, but can help others.
@usabI009
@usabI009 6 жыл бұрын
While using for loop method, you have worked with absolute xpath which might change. How to write customized xpath for selecting calendar dates as this one and then use for loop to select date ?
@ramakrishnants7826
@ramakrishnants7826 4 жыл бұрын
Can you please suggest a different website as lot of changes have happened to freecrm.co.in?
@WMohanty
@WMohanty 4 жыл бұрын
The website where you gave the example has changed a lot. Could you please give another wesbsite to ptactice. Thanks
@tapaskhandai
@tapaskhandai 4 жыл бұрын
It is really helpful
@jdhung
@jdhung 4 жыл бұрын
excellent video.
@mayurmunshi2
@mayurmunshi2 6 жыл бұрын
Very nicely explained !!!!!!
@sheikhkhurram1558
@sheikhkhurram1558 6 жыл бұрын
Hey , i did it in one line no need of two for loops . driver.findElement(By.xpath("//div[@id ='crmcalendar']//tr[2]//following-sibling::tr//td[contains (text() , '"+day+"')]")).click(); just pass the "day" value dynamically
@naveenautomationlabs
@naveenautomationlabs 6 жыл бұрын
Sheik Kurram using dynamic xpath following sibling I have explained in different video. This is for inywry point of view using for loop.
@vikrantshingne8761
@vikrantshingne8761 3 жыл бұрын
Thank you sir. I have a question is that We have to hard code that selected value ?
@thiery572
@thiery572 5 жыл бұрын
Very interesting. Thanks!
@hydrasatya9565
@hydrasatya9565 4 жыл бұрын
in this program if i want to select next date what i hav to do... should i use flag++????
@sagarsapkota8023
@sagarsapkota8023 7 жыл бұрын
naveen its awesome.....
@manaligupta1098
@manaligupta1098 7 жыл бұрын
Great video. Thanks a lot
@LifeinSoBo
@LifeinSoBo 4 жыл бұрын
Hey Naveen thanks once again for an another excellent video. Naveen , could you suggest some certification courses for Automation Architect ?
@naveenautomationlabs
@naveenautomationlabs 4 жыл бұрын
Mail me at naveenanimation20@gmail.com
@reachtosky942
@reachtosky942 Жыл бұрын
@@naveenautomationlabs may I connect with you now to get the idea?
@mrpimpita5555
@mrpimpita5555 6 жыл бұрын
I have a problem in a calendar for example: Month of November the first at the beginning there are 29, 30, 31 and last row I also have 29, 30. As I do so I select November 30 but not October 30 since I am choosing October 30.
@reachtosky942
@reachtosky942 Жыл бұрын
Did you find any solution?
@samlawrence541
@samlawrence541 6 жыл бұрын
hi Naveen, thanks so much for all your unquantifiable effort in all your videos. please, Naveen, I was validating a site for broken links but it terminated abruptly giving a MalFunctionUrlException. and another one gave me a StaleElementException. please, how do I handle this. thank u.
@manoharch1203
@manoharch1203 6 жыл бұрын
Hi Naveen, Please Make videos on Exception Handlings
@mohammedmoinuddina2815
@mohammedmoinuddina2815 6 жыл бұрын
Hi Naveen, this is a great example for the date picker.. I used your concept and came up with the below simple solution by just having a stable xpath. Please review and provide your feedback: Thread.sleep(3000); driver.switchTo().frame("mainpanel"); String date= "23-December-2019"; String[] datearr = date.split("-"); String curdate = datearr[0]; String curmonth = datearr[1]; String curyear = datearr[2]; Select selmonth= new Select(driver.findElement(By.name("slctMonth"))); selmonth.selectByVisibleText("December"); Select selyear= new Select(driver.findElement(By.name("slctYear"))); selyear.selectByVisibleText("2019"); driver.findElement(By.xpath(".//*[@id='crmcalendar']//tbody//tr//td[contains(text(),'"+curdate+"')]")).click(); System.out.println("Clicked");; Thread.sleep(3000); driver.quit();
@mohammedmoinuddina2815
@mohammedmoinuddina2815 6 жыл бұрын
I have just concatenated the date in the xpath
@heenasamreen3191
@heenasamreen3191 5 жыл бұрын
Can you tell how to upload or download file using selenium or autoit?
@rupeshgawande2716
@rupeshgawande2716 6 жыл бұрын
Hi Naveen I used this code in my framework. But how to set verification point for this?
@JASSININETY
@JASSININETY 5 жыл бұрын
Naveen interviewer during selenium interview is asking if you are opening a website and it's opened as blank then how do you debug it.. Please suggest what should I answer them.
@akulabhaskar3797
@akulabhaskar3797 6 жыл бұрын
Thanks Naveen
@gopalsurse2071
@gopalsurse2071 5 жыл бұрын
Naveen please guide me for how to prepare machine test for software [Automation]testing profile [web application testing]
@myfocus7447
@myfocus7447 7 жыл бұрын
did u shared video to handle web table which has dynamic values
@naveenautomationlabs
@naveenautomationlabs 7 жыл бұрын
+Jyoshna Manubolu here it is: kzbin.info/www/bejne/i5aVdaB4fqiCoac
@myfocus7447
@myfocus7447 7 жыл бұрын
thanx it will be gud if u could explain us with getting dynamic row and column count as in real time we depend on this mostly
@sagarsapkota8023
@sagarsapkota8023 7 жыл бұрын
Jyoshna Manubolu dude check his youtube playlist how to become genius in xpath
@himanshusinghal7359
@himanshusinghal7359 4 жыл бұрын
can you share this particular code
@balakrishnan1274
@balakrishnan1274 4 жыл бұрын
Hi Naveen , I have registered in freeCRM site i am not able to login to website which you mentioned in the video. Can you help is any website is there to test this cases. Here i am able to access the "ui.cogmento.com/home" page but here everything is different.
@kimferko9038
@kimferko9038 6 жыл бұрын
Hi, does anybody know why why 'submit' Login button doesn't click on command: "driver.findElement(By.xpath("//*[@type= 'submit']")).click(); " Have tried also with Linktext and className. thank you. Nice videos!
@reachtosky942
@reachtosky942 Жыл бұрын
I wonder why we can't just use visible text ?
@praveenautomationinterview2367
@praveenautomationinterview2367 7 жыл бұрын
Hi Naveen, same issue is here also it is not printing the all values of "dayVal" , and printing uptill the selected date. e.g.: if we selected '19-September-2017' then it is printed only upto 19 and rest are not printed. please guide in this.
@bharathkoneru4008
@bharathkoneru4008 4 жыл бұрын
As you are breaking the inner loop on match & outer loop due to setting of flag value.. values after 19 will not be printed
@priyavijayakumar1509
@priyavijayakumar1509 6 жыл бұрын
how to handle calendar in new event page in freecrm application
@praveen420ify
@praveen420ify 6 жыл бұрын
As Firebug is not supported in Mozilla 55+ version then how can we take Absolute path here for reading calendar date?
@nikitagyanchandani97
@nikitagyanchandani97 6 жыл бұрын
You can use chroPath which is also an extension for chrome browser..just like firebug, firepath in mozilla firefox
@Nitsng
@Nitsng 6 жыл бұрын
Hi Nikita, Thanks for telling about Chropath, but in chrome, chropath is giving relative xpath and in firefox, absolute xpath. have you noticed that?
@srihari4827
@srihari4827 5 жыл бұрын
@@Nitsng we get both absolute and relative xpath using chropath
@niranjanniru5671
@niranjanniru5671 4 жыл бұрын
As usual user the date format will be 01-July-2019 How will you handle 01 date, as 1 will be present in the element
@xoda345
@xoda345 6 жыл бұрын
If i do not have firepath/firebug then I would not get the xpath in these format. So, how to automate in that case?
@raghuveermh6869
@raghuveermh6869 6 жыл бұрын
If you inspect the element, the element DOM structure will come in blue colour. Right clik on it, select copy--copy Xpath. it will give same xpath present in firepath
@xoda345
@xoda345 6 жыл бұрын
@@raghuveermh6869 but that's in Firefox..what about chrome?
@raghuveermh6869
@raghuveermh6869 6 жыл бұрын
In chrome also it will work, I am using same thing I don't have chropath and all. I am writing custom xpath, hardly I will use this method
@SunnyCool1110
@SunnyCool1110 6 жыл бұрын
Hi Naveen, I am unable to handle NoSuchElementException in console. Not printing the message
@kaulsandeep2318
@kaulsandeep2318 6 жыл бұрын
same problem here also I am unable to print the exception message " please enter the correct date"
@nalinaksheepanda1596
@nalinaksheepanda1596 5 жыл бұрын
I think, this is because, there are blank values available in those cell, which are printing in the console instead of the message.
@purnachandrapatra2552
@purnachandrapatra2552 7 жыл бұрын
catch(NoSuchElementException e){System.out.println("please enter correct value"); flag = true; break; i think we need to set the flag as true
@VijayKumar-nv9wy
@VijayKumar-nv9wy 6 жыл бұрын
Yes. I assume the same as by default false is set for flag variable.
@srihari4827
@srihari4827 5 жыл бұрын
Yes inside the catch block flag=true In order for the outer loop to break
@myfocus7447
@myfocus7447 7 жыл бұрын
useful
@swethavarma631
@swethavarma631 5 жыл бұрын
Hi , It is not printing blank space instead throwing me an exception NoSuchElementFound
@shivam_methi
@shivam_methi Жыл бұрын
have you found any solution for this?
@myfocus7447
@myfocus7447 7 жыл бұрын
if we can get dynamic row count no need of handling this no element found exception
@naveenautomationlabs
@naveenautomationlabs 7 жыл бұрын
+Jyoshna Manubolu correct but still it's good to handle nosuchelementexception. I have seen couple of cases where some hidden tr tags are there and selenium doesn't catch them. This is just to show how will u handle runtime exceptions.
@myfocus7447
@myfocus7447 7 жыл бұрын
ok ..thanx
@BhardwajFamily1
@BhardwajFamily1 5 жыл бұрын
Hi Naveen,Thanks for sharing this important video,I am not able to get that exception handling, I have written below code:WebDriver driver=new ChromeDriver(); driver.manage().deleteAllCookies(); driver.manage().window().maximize(); driver.get("www.freecrm.com/"); driver.manage().timeouts().pageLoadTimeout(20, TimeUnit.SECONDS); driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS); driver.findElement(By.name("username")).sendKeys("ajay_automation"); driver.findElement(By.name("password")).sendKeys("ajay@2301"); Thread.sleep(4000); driver.findElement(By.xpath("//input[@type='submit']")).click(); Thread.sleep(4000); driver.switchTo().frame(1); String date= "31-November-2019"; String newdate[]=date.split("-"); String day= newdate[0]; String month= newdate[1]; String year= newdate[2]; Thread.sleep(4000); Select select= new Select(driver.findElement(By.name("slctMonth"))); select.selectByVisibleText(month); Select select1= new Select(driver.findElement(By.name("slctYear"))); select1.selectByVisibleText(year); // //*[@id="crmcalendar"]/table/tbody/tr[2]/td/table/tbody/tr[2]/td[7] String before= "//*[@id=\"crmcalendar\"]/table/tbody/tr[2]/td/table/tbody/tr["; String after="]/td["; boolean flag=false; String newvale = null; final int totalnumberdays=7; for(int i=2;i
@shivi9112
@shivi9112 2 жыл бұрын
Can you please again provide ID and password for logiin page.
@shreyanshjain2347
@shreyanshjain2347 7 жыл бұрын
at 41:20 when flag will be false then if(flag) will not be executed. this if block will only be executed only when flag is true.
@naveenautomationlabs
@naveenautomationlabs 7 жыл бұрын
Correct, because no need to execute outer for loop if expected value is found. Also if date is not appropriate after inner loop will be terminated. Check with all the boundary values and debug the code, you will have a clear picture.
@shreyanshjain2347
@shreyanshjain2347 7 жыл бұрын
Naveen AutomationLabs yes I know that u mentioned in the video that if flag is false then control will come to outer loop and will execute if loop and outer loop will break so I thought of commenting here because people will think like if flag is false then also if(flag) is executing.
@naveenautomationlabs
@naveenautomationlabs 7 жыл бұрын
Thanks @Shreyansh!
@amitbhardwaj1511
@amitbhardwaj1511 6 жыл бұрын
I am still confused with if statement🤔
@arpitadas9542
@arpitadas9542 5 жыл бұрын
hi
Handle Calendar/DatePicker using JavaScriptExecutor - Session -17
17:30
Naveen AutomationLabs
Рет қаралды 99 М.
How to handle Bootstrap DropDown in Selenium - Session - 19
38:12
Naveen AutomationLabs
Рет қаралды 91 М.
Farmer narrowly escapes tiger attack
00:20
CTV News
Рет қаралды 7 МЛН
Симбу закрыли дома?! 🔒 #симба #симбочка #арти
00:41
Симбочка Пимпочка
Рет қаралды 4,8 МЛН
كم بصير عمركم عام ٢٠٢٥😍 #shorts #hasanandnour
00:27
hasan and nour shorts
Рет қаралды 10 МЛН
How to find broken links & Images using Selenium Webdriver
45:35
Naveen AutomationLabs
Рет қаралды 99 М.
What is HTML DOM & StaleElement Exception in Selenium
36:04
Naveen AutomationLabs
Рет қаралды 82 М.
How to Handle Dynamic WebTable - WebDriver Session 14
33:42
Naveen AutomationLabs
Рет қаралды 202 М.
MouseMovement, Drag & Drop and ImplicitWait in Selenium - Session 5
42:14
Naveen AutomationLabs
Рет қаралды 209 М.
How To Handle Calendar in Selenium Webdriver
25:00
Mukesh otwani
Рет қаралды 132 М.
How to Become Genius in XPath in Selenium  - Session -18
39:48
Naveen AutomationLabs
Рет қаралды 726 М.
Selenium Framework Tutorial #9 - Data Driven Testing with TestNG DataProvider
17:35
Selenium Tutorial Series | Part 22 | Working with Calendars | Tamil
14:26
Learn Automation Online
Рет қаралды 29 М.
Highlight elements using JavaScriptExecutor - Selenium WebDriver Session 11
20:06
Farmer narrowly escapes tiger attack
00:20
CTV News
Рет қаралды 7 МЛН