Selenium Framework - Part 17 - Fixing Issues in Framework with Enum

  Рет қаралды 5,117

Testing Mini Bytes

Testing Mini Bytes

Күн бұрын

Hi All,
In this video, we will fix the explicit wait implementation and property file implementation with enums.

Пікірлер: 26
@prashanthig896
@prashanthig896 Жыл бұрын
Great Info Amuthan...Thanks a lot for your videos..I am learning daily from your videos
@bipinnair374
@bipinnair374 3 жыл бұрын
Seriously this was something else. Need to watch it again :)
@imrankhan-wy3yb
@imrankhan-wy3yb 3 жыл бұрын
Never ever in my life bro. You are giving goosebumps
@krishanuchakraborty3500
@krishanuchakraborty3500 3 жыл бұрын
Dude this is next level thing, I am going through all the videos, cant wait to complete all the videos... Thanks!!!
@sendhilgajendran9250
@sendhilgajendran9250 3 жыл бұрын
great channel to learn automation in depth !
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Glad to hear that!
@surwase1
@surwase1 3 жыл бұрын
Excellent Sessions!!! You really rock!!. It is next level of creating a framework
@lka5968
@lka5968 3 жыл бұрын
awesome again
@rikki7663
@rikki7663 Жыл бұрын
till now i watched 17 videos and all are awesome learned lot of new thing i just want to ask one thing can you suggest any project related to automation which i can showcase while applying for job
@sp38860
@sp38860 3 жыл бұрын
Thank you 👍, learning a lot strategy , and clean coding .
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Hi Sandesh , Thank you so much for taking your time to appreciate !! We all learn a better way to code together :)
@nitinraj8745
@nitinraj8745 3 жыл бұрын
Nice video. Thanks a lot
@sagars3332
@sagars3332 3 жыл бұрын
Hi sir first of all let me thank you for great great free automation content ever in youtube.Sir my doubt is if we can keep constants stuffs in FrameworkConstant package then why we are keeping in enum??I have never used enum before so little bit confused about applying it in framework..
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
You will get to understand if you watch the video again. It is okay if you still not confident, you will get good understanding over a period of time.
@xoda345
@xoda345 2 жыл бұрын
Hi Amuthan, how would you return a list of elements in the reusable explicit wait method. In the wait method where you are combining all the wait strategies and returning single web element is fine but what if I need to get a list of web elements so how do I return that and that too how it can be done in the same method where we are just returning one web element?? Please suggest Amuthan.
@TestingMiniBytes
@TestingMiniBytes 2 жыл бұрын
You can create a different method for that.
@amblessed_onwumere
@amblessed_onwumere 3 жыл бұрын
I think that for clicking an element, the wait strategy should be ExpectedConditions.elementToBeClickable(by) or better still, we can use until(ExpectedConditions.and( ExpectedConditions.visibilityOfElementLocated(by),ExpectedConditions.elementToBeClickable(by)));. I think there is no point in asking the user to supply the wait strategy to use. That we can directly take care of in the code
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
Hi Okechukwa, You are absolutely correct. If we are developing a framework for our project we can do that. But we are developing the framework for our company and we need to give options to the user. Suppose conisder someone have to wait for the invisibility of a particular element before clicking on this element, then in your case to make it work he has to write the child page class and he cannot use the click method wrapper we generated. In the framework we have created, we have given them the skeleton to enrich more. So he can add a new waiting strategy enum and build the logic in thd explicit wait factory which mutating the page layers. Things work in both the case and how easy to maintain and how easy is to add new feature is important. Again I am trying to bring you the best practice to solve a problem. It is up to you to choose. Thanks again for your question. 🙏
@snehakejriwal7340
@snehakejriwal7340 3 жыл бұрын
How do I use enum for webdriverwait timeout. Seconds..say high wait ,medium wait and low wait with timeout value 10, 8, 5 secs....can you please explain
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
That's the same way how we have done here. But why do you want different wait like that.?
@amitchauhan1505
@amitchauhan1505 3 жыл бұрын
we could use one more definition of method, Click(By by), overloaded one without having waitStrategy. Majorly we dont need waitStrategy but at some locations. In that case i dont need to send WaitStartegy.NONE. No? I liked the work by the way.
@TestingMiniBytes
@TestingMiniBytes 3 жыл бұрын
We will optimise this piece of code soon.
@HariHaran-cw6zf
@HariHaran-cw6zf 2 жыл бұрын
Hi. Thanks for the video. I am not able to find name() method when i use ConfigProperties enum reference. public enum ConfigProperties { URL; } and in ReadPropertyFile class, public static String getValue(ConfigProperties key) throws Exception { if(prop.getProperty("")==null || key ==null) { throw new Exception("Property name "+key + "is not found"); } key.name()==========> MISSING //return prop.getProperty(); }
@madhumuppala2274
@madhumuppala2274 3 жыл бұрын
The following logic is returning null after changing (ConfigProperties key) if(Objects.isNull(key) || Objects.isNull(CONFIGMAP.get(key))) {...} Once I changed it to && it worked for me. if(Objects.isNull(key) && Objects.isNull(CONFIGMAP.get(key))) {..}
@bharathkoneru4008
@bharathkoneru4008 3 жыл бұрын
On changing key type to enum - ConfigProperties, key is an enum constant and we need to get the string from it, convert it to lowercase and then perform null checks. if(Objects.isNull(key.name().toLowerCase()) || Objects.isNull(CONFIGMAP.get(key.name().toLowerCase())) {...} CONFIGMAP is expecting the key of String type, as we defined Map with both key and values as String types. We stored the key-value pairs(entries) as Strings into CONFIGMAP from the Properties object(once loaded). I hope this helps.
@umainti4184
@umainti4184 2 ай бұрын
Got the same issue and resolved with help this comment. Thank you for the fix.
Selenium Framework - Part 16 - Enum - The Saviour
28:01
Testing Mini Bytes
Рет қаралды 6 М.
Synyptas 4 | Арамызда бір сатқын бар ! | 4 Bolim
17:24
Бенчик, пора купаться! 🛁 #бенчик #арти #симбочка
00:34
Симбочка Пимпочка
Рет қаралды 3,5 МЛН
How I moved to US from India on H1B | What you should know |
14:18
Testing Mini Bytes
Рет қаралды 1,5 М.
#23 - What is #EnumSet in Java Collection Framework?
17:06
Naveen AutomationLabs
Рет қаралды 14 М.
Explain OOPS Concepts in Selenium Automation Framework
20:04
RD Automation Learning
Рет қаралды 26 М.
Synyptas 4 | Арамызда бір сатқын бар ! | 4 Bolim
17:24