Selenium Beginner Tutorial 9 - How To Make Code MODULAR

preview_player
Показать описание
Today we will learn:
1. How to identify actions
2. How to make code modular
_____________________________
Step 1: Create methods for separate actions/functionality
Step 2: Copy required code from main to these methods
Step 3: Call the methods from main in required sequence
Step 4: Run and Validate

Helpful Tips:
1. Create a separate function for every functionality
2. Add comments wherever applicable and useful

________ ONLINE COURSES TO LEARN ________

------------ FOLLOW ------------

Like, Subscribe, Share
You can support my mission for education by sharing this knowledge and helping as many people as you can
Рекомендации по теме
Комментарии
Автор

Great !!
Thanks, Raghav, even I am not expert in JAVA. but while seeing this video, I understood.
what is function and how to write code in the proper way. going for next one now :)

riteshwankhede
Автор

You are demonstrating advance teaching/lecturing skills, as it is clear, understandable, simple and methodical. Your skills and tutorials prove your knowledge and how to pass it in a pragmatic approach. Thank you Raghav.

goransavic
Автор

I am addicted to your teaching style, flow, tone and voice. you are an amazing teacher sir.

AzadSingh-zpix
Автор

Excellent was looking for this to implement in my project..keep posting such videos....Thanks

kaustubhbaitule
Автор

Excellently Excellent !!, after watching ur 11th tutorial on selenium, i slowly moved to all the videos and learned a lot. Thanks dude !!

MrAmarSindol
Автор

Thanks Raghav, very good explanation!

pvp
Автор

Very helpful...easy to understand & implement

GovindYadav-icpy
Автор

you can create a function with String parameter to choose the browser without changing the source code
public static void setBrowser(String browserchoice){
browser=browserchoice;
}

bilalrahaoui
Автор

Sir, how to handle negative testing in automation, please explain. Resources are not available on this topic.

balajikoc
Автор

Can I have the link of previous session!!!

sajithas
Автор

Hi Raghav,
I have got an error when i try to run with chrome option.Below adding logs :

Starting ChromeDriver 2.36.540470 on port 13825
Only local connections are allowed.
Exception in thread "main" unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.36.540470 (e522d04694c7ebea4ba8821272dbef4f9b818c91), platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 138 milliseconds

prajunapradeep
Автор

I tried Modular by myself i have done everything as you said in the video but i come across this error Exception in thread "main"
at
at
if browser = "Firefox" the its working fine but when i changed to Chrome then the above error occurred

sijoalexv
Автор

While running test on Firefox browser, I don't need the below kind of line ?
System.setProperty("webdriver.firefox.driver",

deepakMCAknit
Автор

Hello Raghav
I  just made my code modular but when I run the application show me an exception, but I can't find where is problem. the console show me this:
Exception in thread "main"
at
at

and the line 43 is:
and 15:
runTest();

Can you help me to find the problem? Thank you

giselly
Автор

hi, I am beginner to selenium .i am getting error while to launch chrome web driver.After i down load chrome driver 2.21, i extracted folder and i could see only chrome driver application, but could not found chromedriver.exe file .no where in my pc also.Without chromedriver exe file how can run my selenium code ?
could u plz help me on this whre to find?

srinivasreddy
Автор

I do the same code and follow the steps but instead of opening chrome still opening firefox, what is the reason?

sarkaran
Автор

Hi,
I got an error while executing the same program.Please help me to find a solution .Below are the logs :
Exception in thread "main"
at
at

prajunapradeep
Автор

whenever iam write this program i get nullpointexception

golusulasrikanth
Автор

Please, could you make video how to upload the file with Jmeter?

delfin
Автор

The playlist content doesnt stick to given topic

yogeshsharma-cjky