Тёмный

Must Know JAVA concepts | Selenium Automation | PART - 2 | File Writing Operations 

Learn Automation Online
Подписаться 82 тыс.
Просмотров 17 тыс.
50% 1

Writing a file is one of the basic and the most important thing expected out of any automation and java developer. File writing can be done in several ways. like File Writer, Buffered Writer, FileOutputStream and Path. Each way has its own advantage and disadvantages.
What will we learn in this video:
1) What is file writing?
2) How to do File writing in Java?
3) Different Ways to do File writing in Java?
4) Advantages and disadvantages
#Java #FileWriting #BufferedWriter #FileOutputStream #Path #LearnAutomationOnline
Best way to reach me (replies will be faster): RU-vid comment section
Also, you can follow me on Facebook and Instagram.
Facebook: bit.ly/2TqPlis
Instagram: bit.ly/2Ez36rH

Опубликовано:

 

18 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 52   
@mohamedzamil5527
@mohamedzamil5527 3 года назад
sir your teaching methods is really awesome i learn more concept in your tutorial thank you so much and keep rock
@gowthamshanthi3368
@gowthamshanthi3368 2 года назад
Wonderful Teaching Brother :) Thank you.. #1- Why we need to include close() method after write operation each time. Have tried to run the program by without including close().Still it works. Can you please explain why we need to use close(); #2-Please suggest a laptop that will be useful to learn automation and work on it Thanks
@renukadevi1285
@renukadevi1285 2 года назад
hii Arul ,all of ur videos very useful,thanks alot
@soundaryaramadoss1706
@soundaryaramadoss1706 3 года назад
Excellent bro
@benittoraja5957
@benittoraja5957 2 года назад
Thank you.
@krishnapriya3187
@krishnapriya3187 5 лет назад
Hi Arul, Your videos are very useful to learn/understand the concepts. Thanks for that. I have a doubt in this chapter. In this video, you have hardcorded the content and writing it in a file. Say if I have a requirement to write a particular content of a Web page into a file, how can i write. Eg: can i able to refer the XPATH of that particular paragraph and write it in a file? Please clarify. Thanks.
@LearnAutomationOnline
@LearnAutomationOnline 5 лет назад
Hi Krishna Priya, you have to take the text out of the web element using get text, store it in a string and write that string to a file. This is the way to achieve it
@karthikeyansugumar20
@karthikeyansugumar20 5 лет назад
Actully i'm NOT gettin the explanation given for fileoutputstream. Can you explain further by givin examples where exactly it will be used.
@sakthi4296
@sakthi4296 4 года назад
Would be greatfull if you could explain why and where its used in realtime, example (just one line brief is enough Like banking, atm, ticket booking like that) so its easy to connect and understand the concepts aswell,. (for all the concepts, if possible)
@LearnAutomationOnline
@LearnAutomationOnline 4 года назад
Thanks for the suggestions sakthi. If you regularly follow my videos, you can understand, tht I always start with the why question. This video series, is for selenium testters working with Java. And in their daily work they hve to deal with several other things, thts what have been explained. If it were development, series, explanation will be different
@harikrishnan5415
@harikrishnan5415 Год назад
Thalaiva java.lang.outofmemoryerror Jav heap memory nu solli oru error varuthu after running the full suite.... Ithunala Report generate aaga matikuthu....Intha Error fix panna konjam solution Sollunga....I'm completely Block
@vigneshbalakrishnan490
@vigneshbalakrishnan490 2 года назад
Bro inga location variable namba string type la vangrom atha namba store panraa ma bro patha aa
@SuriyaSparrow
@SuriyaSparrow 2 года назад
Bro Main methods ithiku theava apdinu epdi identify pandrathu?? Because Testngla Main methods theava illanu soningaa ithiku use panringa How to find this???
@LearnAutomationOnline
@LearnAutomationOnline 2 года назад
Intha video la testing pathi explain panala. Java la iruka testers athigam use panra functionalities ah describe panren. Ovoru concept kum testing project la epdi varum nu, guess panna vendithilla. When you come to framework building you will understand these.
@SuriyaSparrow
@SuriyaSparrow 2 года назад
@@LearnAutomationOnline oo ok ok Bro Thanks for your reply ❤️❤️
@livemadras9380
@livemadras9380 2 года назад
C:\Program Files\Java\jdk-17.0.1\bin\javaw.exe (28-Dec-2021, 2:04:45 pm) Anna, i got This error How to solve this reply as soon as possible and also I am not able to see the file writer folder
@Balamurugan-wh6pi
@Balamurugan-wh6pi 3 года назад
Hi, bro I am following your videos. File write > path method, I have imported "import java.nio.file.Files;" package but not getting write("Path":"bytes[]").
@alwinj4229
@alwinj4229 2 года назад
File writing vandhu nama endhe oru particular location le venalum create panne mudiyuma like ,user..... desktop...and D drive....etc
@LearnAutomationOnline
@LearnAutomationOnline 2 года назад
Yes you can. If you have the permission to write on that location
@sivanellaiappan5788
@sivanellaiappan5788 4 года назад
Hi arul I can able to understand the filewritter program but in real time where we can use this and how what's the usage of filewritter
@LearnAutomationOnline
@LearnAutomationOnline 4 года назад
Siva whenever we have a requirement of writing a file, we can go for file writer class. It's straightforward.
@karthikeyansugumar20
@karthikeyansugumar20 5 лет назад
At 17.39 you gave from as (content.getBytes()) & to as (path). It didn't work so you changed it. Actually from should be content.getBytes() & to should be path only rite? Here it works only if we give it in reverse. Why?
@karthigamuthusamy810
@karthigamuthusamy810 5 лет назад
Hai sir, can u share interview questions and answers for java developer.we except more concept and detail about collection also.
@LearnAutomationOnline
@LearnAutomationOnline 5 лет назад
This channel is fully focused for automation and related stuff. There are plenty of resources available on internet for java interview questions. In my channel, I would have taken concepts whichever is needed for selenium automation. Please refer to java for selenium automation playlist. And the reason for not putting java development tutorials is, very soon java is going to become obsolete as they have started charging for commercial usage. Companies are soon going to migrate to python or go languages. These will be covered in future.
@prakashn690
@prakashn690 5 лет назад
@@LearnAutomationOnline bro apo python tutorial podunga usefull ha irukum 😋
@LearnAutomationOnline
@LearnAutomationOnline 5 лет назад
Python and go languages tutorials are on pipeline
@karthikeyansugumar20
@karthikeyansugumar20 5 лет назад
At 3.41 you are removin public & givin explation for it. Can you explain it further. I'm not gettin it. How to write a file in some other location other than below the project itself? Just give the path of the location or it as different procedure?
@LearnAutomationOnline
@LearnAutomationOnline 5 лет назад
If you are not storing the file under the project then you have to give the location of the file. Just like you are giving for WebDriver.
@rajmohammed6229
@rajmohammed6229 Год назад
In FileWriter, I am writing more than 2 string, how to write that content string in next line. I tried but all content coming in same line
@10thonly48
@10thonly48 6 месяцев назад
String Content = "first line"+" "+"Second line";
@felixrajan4804
@felixrajan4804 4 года назад
Hi, In path, I typed “Files.write” then press ctrl+Space . It showed “write(Path path, byte[] bytes, OpenOption options). So manually typed “Files.write(path,content.getBytes[]); Why?
@LearnAutomationOnline
@LearnAutomationOnline 4 года назад
Refer the import statement of the path. There may be different paths available under different packages
@felixrajan4804
@felixrajan4804 4 года назад
Learn Automation Online Thx for ur reply. I typed what you said (java.nio).
@deepaksundarragavan4697
@deepaksundarragavan4697 4 года назад
Hi Sir, Last task we never used close the file but it is not impact in program can u pls explain 😔
@LearnAutomationOnline
@LearnAutomationOnline 4 года назад
It's always a better practice to close opened resources like files or db operations. Even without it , the code will work. But it would be great if we use.
@deepaksundarragavan4697
@deepaksundarragavan4697 4 года назад
Thank you so much the response 🙏
@divyavarman5858
@divyavarman5858 5 лет назад
Hi AP, unable to understand FileOutputStream? Could u pls explain this with an example?
@LearnAutomationOnline
@LearnAutomationOnline 5 лет назад
Hi Divya, file output stream is one of the many options that we have for writing into a file. FileOutputStream is meant for writing streams of raw bytes such as image data. For writing streams of characters, we can use FileWriter. No need to worry about this, if you are familiar with other ways like file wriiter.
@divyavarman5858
@divyavarman5858 5 лет назад
@@LearnAutomationOnline Thanks AP :-)
@Meena-Rajendran
@Meena-Rajendran 5 лет назад
How to store file location in folder in same Project?Please tell me Arul.
@LearnAutomationOnline
@LearnAutomationOnline 5 лет назад
If you just give the file name alone within double quotes, then the file will be stored automatically in the project location itself.
@SaiMeenaSai
@SaiMeenaSai 5 лет назад
Thank you arul
@divyavarman5858
@divyavarman5858 5 лет назад
Hi AP, .txt file la mattum than write panna mudiyum ah? If no, kindly mention the supported formats.
@LearnAutomationOnline
@LearnAutomationOnline 5 лет назад
You can write in any file format. But, 99 percentage we will stick with TXT files because of its simplicity. Word or PDF format are rarely used unless there is a special need and we have to use supporting libraries in that case.
@divyavarman5858
@divyavarman5858 5 лет назад
@@LearnAutomationOnline Thanks AP :-)
@vijaystudio1582
@vijaystudio1582 4 года назад
Hi Bro, Bro, in Location - we are giving file name la... athula ".txt" use pani aaganuma! Use panalana any problem ah bro!!??
@LearnAutomationOnline
@LearnAutomationOnline 4 года назад
File extension is necessary. If u want to test what will happen simply remove it and test.
@vijaystudio1582
@vijaystudio1582 4 года назад
@@LearnAutomationOnline Yes Bro! Try pani paathutan! Thank you!!
@m.s.prathusha9420
@m.s.prathusha9420 3 года назад
As u said I'm learning this for interview.. I learnt your series and must know java concept until this... is this ok to take an interview... or do I went to know the framework tooo... I have 6 yrs career break... can u guide me plz... thanks
@LearnAutomationOnline
@LearnAutomationOnline 3 года назад
What are all the playlist that u have learnt?
@m.s.prathusha9420
@m.s.prathusha9420 3 года назад
@@LearnAutomationOnline 1. getting started with selenium untill 22. 2.must know concept in java (1 and 2) 3. Page object model introduction 4. log4j (must know concept in java 5) i learnt above playlist.. im going through selenium live - pom
@LearnAutomationOnline
@LearnAutomationOnline 3 года назад
Learn github, maven and jenkins as well. U should be good enough. If u have time learn cucumber .
Далее
Prank Orchestra
00:10
Просмотров 1,9 млн
Dora was kidnapped and then… 😨 #shorts
00:18
Просмотров 2,9 млн