Page Object Model - Python Selenium with PyTest - Part 1

  Рет қаралды 93,283

Naveen AutomationLabs

Naveen AutomationLabs

Күн бұрын

Пікірлер: 109
@sharat86chandra
@sharat86chandra 3 жыл бұрын
Was searching from a couple days for an exact video on PyTest Framework and came across this video. Its really very helpful. Now this will help me start creating a framework on my own for my project. Thank you very much Naveen :)
@mukeshavatarmadesia2043
@mukeshavatarmadesia2043 2 жыл бұрын
Hi Sharat Can you share sample code structure based on POM. To login , take screenshot and generate report Using selenium python pytest and any report
@raweth1
@raweth1 Жыл бұрын
Dude this is awesome work, you da man!!! I dont care if you talk in hindi .. this is truly exceptional work!!!
@kankipatiramaraju4983
@kankipatiramaraju4983 4 жыл бұрын
Thank you, you should get more appreciation for this wonderful content..
@singh07neeraj
@singh07neeraj 4 жыл бұрын
tons of thanks, Naveen I was waiting for Python Selenium videos.
@Ravi-wd1rv
@Ravi-wd1rv 3 жыл бұрын
Thank you Naveen. It is very insightful. And very helpful for people who don’t understand where to start to build framework.
@ayyajjamadar6387
@ayyajjamadar6387 4 жыл бұрын
Most awaited video for me Thank you
4 жыл бұрын
Perfect tutorial. Waiting for the next chapters.
@naveenautomationlabs
@naveenautomationlabs 4 жыл бұрын
Thanks a lot! Part 2 is already there in the same playlist.
@akashmishra1598
@akashmishra1598 2 жыл бұрын
​@@naveenautomationlabs Hi Naveen, as you have covered all the concepts in Selenium with Java playlist, Can you please create Selenium with python in a similar way. It's really very interesting to watch your videos and we gain lots of knowledge ..
@kesavab5970
@kesavab5970 4 жыл бұрын
Thanks for the video...Waiting for part2
@defaulterjk
@defaulterjk 2 жыл бұрын
Awesome 👍 very smoothly taught 2 good
@gahung206
@gahung206 Ай бұрын
Can I know how do pytest understand self.driver at 30:47, where it comes from?
@dushananuradha1098
@dushananuradha1098 2 жыл бұрын
Super helpful. Thanks a lot for sharing..
@rakeshpatra1955
@rakeshpatra1955 4 жыл бұрын
Sir can you please come up with a video over jenkins with Python .I am eagerly waiting for this.
@hajirasharieff9121
@hajirasharieff9121 3 жыл бұрын
Amazing! Loved the explaination! Thank you
@jackjack-kh2ng
@jackjack-kh2ng 4 жыл бұрын
Thanks a lot Naveen. Waiting for Part 2
@shailajadavangave45
@shailajadavangave45 2 жыл бұрын
Thanks Naveen for the video series on pytest it helped me a lot for the interview, please make video on how to implement logging in pytest and how to rerun failed testcases
@indusaptarshi
@indusaptarshi 3 жыл бұрын
Sir wonderfully explained, is this uploaded to GIT?
@singh07neeraj
@singh07neeraj 4 жыл бұрын
Eagerly awaiting for next video :)
@salmanmohamed1993
@salmanmohamed1993 2 жыл бұрын
hi naveen sir, iam getting below error while executing the test self.loginPage = LoginPage(self.driver) E TypeError: LoginPage() takes no arguments
@ashutoshpratapsingh6872
@ashutoshpratapsingh6872 4 жыл бұрын
A big thanks for this, great
@naveenautomationlabs
@naveenautomationlabs 4 жыл бұрын
happy now? :)
@ashutoshpratapsingh6872
@ashutoshpratapsingh6872 4 жыл бұрын
@@naveenautomationlabs yes thanks a lot
@ashutoshpratapsingh6872
@ashutoshpratapsingh6872 4 жыл бұрын
@@naveenautomationlabs Naveen now we need to update fixture scope, after removing scope then it's opening new browser for each test methods, otherwise it will do in single browser
@RajeevNandiMusic
@RajeevNandiMusic Жыл бұрын
What was the point of base page class if config py & page class can hold all the reusable info/methods specific to the test ?
@nileshgadekar668
@nileshgadekar668 4 жыл бұрын
Thanks for your efforts ❤️❤️
@Shanky12
@Shanky12 3 ай бұрын
Hi Naveen, can i use this framework creation style for my current project, or is there any changes that i need to check?
@praveenvanahalli3353
@praveenvanahalli3353 4 жыл бұрын
Hi Naveen, Nice video. I tried the same flow but getting AttributeError: 'TestLogin' object has no attribute 'driver' in test_login_page method as below. I checked the code syntax and spelling. Everything is fine. def test_login_page(self): > self.loginPage = LoginPage(self.driver) E AttributeError: 'TestLogin' object has no attribute 'driver' Tried to resolve it but not getting the right resolution to fix it.
@harishms1562
@harishms1562 4 жыл бұрын
Hi Praveen, even i'm getting the same error. Did u resolve it? can you please ping me @sumalatha1390@gmail.com
@SatyabrataNayak91
@SatyabrataNayak91 3 жыл бұрын
@@harishms1562 Did you find the solution for this issue, I am also facing the same
@sunilkumarr4257
@sunilkumarr4257 2 жыл бұрын
@Praven Vanahalli - Did you get the solution for this issue? I am getting the same and not getting resolved. @Naveen AutomationLabs
@hotgorshok1357
@hotgorshok1357 3 жыл бұрын
Why did you override constructor in loginpage class? Because it inherits constructor from basepage
@silppas1577
@silppas1577 2 жыл бұрын
Is it best practice to create object for class LoginPage separately in each function. Is thr any other way we can do this
@smarty420ful
@smarty420ful 3 жыл бұрын
the site you have given is not loading with automation but when I try to do open It manually it works fine.. Is there any workaround to resolve the issue
@logeshv7685
@logeshv7685 4 жыл бұрын
Hi Naveen, i just need to udst the way in which we can keep desired capabilities into a setup method and invoke it every time we run our automation?
@CristianoistheGOAT-g3b
@CristianoistheGOAT-g3b 3 жыл бұрын
Thank you for this tutorial. I encountered this error "fixture 'init_driver not found" when I tried to execute the test cases. How can I fix it? I use a mac.
@shalininandakumar7162
@shalininandakumar7162 4 жыл бұрын
Hi Naveen, Thanks for the video. I implemented the same thing you showed, but got an error AttributeError: 'LoginPage' object has no attribute 'driver'. Can you please help me figure out the reason for this
@ankitdhungana6181
@ankitdhungana6181 4 жыл бұрын
Try adding BasePage as the parameter in the class. Eg. class LoginPage(BasePage): Also don't forget to import BasePage from Pages.BasePage import BasePage
@sunilkumarr4257
@sunilkumarr4257 2 жыл бұрын
@Shalini Nandakumar - Didi you get a solution to this issue? I am also getting the same issue. Is there any solution?
@imranshaik5885
@imranshaik5885 Жыл бұрын
​​@@ankitdhungana6181 imported base class but still error is seen
@rorymer
@rorymer 4 жыл бұрын
Hello, how are you? To make a connection with BDD behave or with pytest-bdd as it would be with the FW that you are building, I tried but could not. What if I could do is how far did you get with the framework
@suman3210
@suman3210 Жыл бұрын
Thanks Naveen. Can you please share the repostory URL to download this code.
@muhammadasadtahir284
@muhammadasadtahir284 2 жыл бұрын
Can you please guide me to resolve this error ? ImportError while loading conftest 'C:\Users\Asad\Desktop\Python Automation Project\SQA_POM_Project\Test\conftest.py'. ModuleNotFoundError: No module named 'Test.conftest'
@SLEDGE872
@SLEDGE872 Жыл бұрын
Same error I'm having now bro, did u get any solution for this issue, Please help if u found any solution.
@SLEDGE872
@SLEDGE872 Жыл бұрын
Bro Got the solution __init__.py needs to be added each and every folders to directories
@imranshaik5885
@imranshaik5885 Жыл бұрын
​​@@SLEDGE872 Hi bro i am facing the same error
@imranshaik5885
@imranshaik5885 Жыл бұрын
Bro can u explain me the solution clearly please.
@apekshapradhan5996
@apekshapradhan5996 3 жыл бұрын
Hi SIr, I have taking the refernce of this code to automate my application , I am facing fixture 'init_driver' not found error. Can you please tell me the solution to remove this error
@arpadszilvesztervarga4113
@arpadszilvesztervarga4113 3 жыл бұрын
Nice video thank you! I just have an issue when I'm trying to navigate inside the webpage and paging to a different sub page on website the webdriver jumps back to the original URL. Can you give any advice with that? Much appreciation in advance:)
@mandeeparora2875
@mandeeparora2875 4 жыл бұрын
Hi could you prepare a video regarding how to automate when we have to perform drag and drop on slider which does not have any value in its properties. But we want to perform drag and drop using some defined values
@Vsksharma
@Vsksharma 2 жыл бұрын
Thanks Navven for the series on pytest and POM. Can you cover screenplay using the same login test?
@KarthikVicky-e3l
@KarthikVicky-e3l 10 ай бұрын
hi naveen iam getting module get not callable..... how to fix this
@chaitanyashirodkar8069
@chaitanyashirodkar8069 4 жыл бұрын
My question might come in Part2 session. But I need the answer asap because of some urgency. Think I have two py files. File1 class will have 3 methods and File2 class file will have 2 methods. When I run the entire directory it is opening the browser two times for executing each class file. I do not want that, I want all 5 methods from both class files to run on the same browser. Any help in quick time is much appreciated.
@ethishrooney764
@ethishrooney764 3 жыл бұрын
Hi Sir, trying to use webdriver manager in pytest getting error if request.param == "chrome": > web_driver = webdriver.Chrome(ChromeDriverManager.install()) E TypeError: install() missing 1 required positional argument: 'self'
@kirthikarajendran7627
@kirthikarajendran7627 4 жыл бұрын
Hi Naveen sir ,I was having 6 years in manual testing . Then have a gap of 2 years . Now searching for a job. I have applied almost 200 applications for manual . Not Even get a single vendor call . In these days , automation are in demand . Can I re start my career with selenium with python or selenium with java . I don’t have programming skills . Pls suggest on this ?
@snsnsnsnsnnsnsnsnsnsnsnsnj7478
@snsnsnsnsnnsnsnsnsnsnsnsnj7478 4 жыл бұрын
If elements are not visible in case there are multiple mouse hovers... If inspect elements not working on it... In that case what should we do?
@maheshbabukandukuri1989
@maheshbabukandukuri1989 4 жыл бұрын
Hi Naveen, Thanks a lot for the video. I'm looking for this session Pyest using POM I have a doubt here how to run only failed tests in Pytest??? do we have any package to install to run only specific fail tests wherein Java, we can run by using testng-failed.xml file. Awaiting for next video :)
@srinikesh.M
@srinikesh.M 3 жыл бұрын
Is There Scope for Python Selenium!! I couldn't find much opening in Top MNCs
@wardaliaqat4093
@wardaliaqat4093 4 жыл бұрын
Hello Sir, I completely followed your code but on side side it's just running one test not the remaining 2 also when i tried to run tests in parallel. why this?
@the_kavita_cafeteria
@the_kavita_cafeteria 4 жыл бұрын
Hello Naveen Sir, A small request, kindly show how to select values from static drop down *through page object model, reusable method* please 🙏
@manikantareddy7283
@manikantareddy7283 4 жыл бұрын
Hi Naveen, I'm new to automation and have a doubt.. Having Utility class is good or bad idea. I know that it helps in reusability.. I have gone through few blogs they say this not to use utility class. I've also seen your videos saying create utility classes.. I'm bit confused. Please help 🙂
@matthewanderson2959
@matthewanderson2959 2 жыл бұрын
Navven, thank you for posting this video. I am attempting to put what I've learned in this video into practice and set up my folder structure similar to yours and I am using visual studio code as my IDE but I cannot get my test_LoginPage.py file to see the config.py file. How were you able to get your test files to see files in other directories?
@satheeshkumarn722
@satheeshkumarn722 Жыл бұрын
Yes, I'm also facing the same issue. Please help me with this.
@prabhumishra3323
@prabhumishra3323 4 жыл бұрын
Hi sir, could you please make a video on how to create a function in python to select dependant drop down values. For example select a drop down value, then based on the selection another drop down appears with values. All the dependant drop down should have same xpath but should only differ in it’s preceding value.
@sriharich28
@sriharich28 3 жыл бұрын
Could you please do a one more session on page object model selenium with Python using pytest framework with selenium webdrivermanager I tried but it couldn't work for me
@shankarmeenakshi-sundaram2959
@shankarmeenakshi-sundaram2959 2 жыл бұрын
Hi , I did the same .But my script is not getting executed. like chrome window is not opening
@prasannakumarthallapally416
@prasannakumarthallapally416 3 жыл бұрын
def get_attribute_value(self, by_locator, value): element = WebDriverWait(self.driver, 10).until(EC.text_to_be_present_in_element_value(by_locator)) return element.get_attribute(value) Is this correct code for get attribute value? Can you please correct anyone?
@venkateshr5461
@venkateshr5461 Жыл бұрын
Value should be string 'value' 👍
@rajanipagadala3081
@rajanipagadala3081 4 жыл бұрын
Waiting for next parts
@bayronalexisorozcogranja8914
@bayronalexisorozcogranja8914 3 жыл бұрын
Hi! im new with python and pytest in at moment a have this problem (fixture 'init_driver' not found). thakns for you help!
@shawonshariff7469
@shawonshariff7469 3 жыл бұрын
Did you solved it? I am facing the same problem now.
@bautistagaggiotti116
@bautistagaggiotti116 3 жыл бұрын
I dont understand where does he actually uses de BASE_URL to navigate to the website
@asmitakumari5894
@asmitakumari5894 Жыл бұрын
Hi Naveen sir. Can I get git hub link for this code.
@yuvarajyuvaraj5606
@yuvarajyuvaraj5606 3 жыл бұрын
Hi Sir, every time my web page input id/ password name changing dynamically. could you suggest any idea?? e-x: input id ="fxd12" name= username input id ="fxh22" name = password after restarting my application e-x: input id= "fxd13" name= username input id="fxd33" name=password how to get a constant id and password??
@RajeshKumar-eg3uz
@RajeshKumar-eg3uz 4 жыл бұрын
fixture 'init_driver' not found - showing this error when I try to execute, please help me what I really missing?
@smarty420ful
@smarty420ful 3 жыл бұрын
may be you missed to add the fixture on the conftest.py
@MubeenAli-pz5vs
@MubeenAli-pz5vs 4 жыл бұрын
When will next video be released?
@anshuljain8136
@anshuljain8136 3 жыл бұрын
Hello, I am getting below error: Please let me know how to resolve it ..TIA self.login_page = LoginPage(self.driver) E AttributeError: 'Test_login' object has no attribute 'driver' test_LoginPage.py:11: AttributeError
@testtest-pb8hv
@testtest-pb8hv 2 жыл бұрын
Hey, did you find the solution ? I got the same error
@santanusaha5615
@santanusaha5615 2 жыл бұрын
ImportError while loading conftest 'D:\AutoProject\Tests\conftest.py'. ModuleNotFoundError: No module named 'Tests.conftest' I get the above errors, any pointers for these? Regards Santanu
@ashishsahu8065
@ashishsahu8065 2 жыл бұрын
hi can u please tell me why login page of hubspot site is not accessible ?
@MohanKumar-ci7bg
@MohanKumar-ci7bg 2 жыл бұрын
Did you get resolution for this ? Even I am getting same error
@SLEDGE872
@SLEDGE872 Жыл бұрын
@@MohanKumar-ci7bg Bro Got the solution __init__.py needs to be added each and every folders to directories
@jarosawtrykowski5589
@jarosawtrykowski5589 3 жыл бұрын
Hi Is the code of your presentation available to download?
@danipeer4699
@danipeer4699 2 жыл бұрын
great video. When can we download the code?
@ParasJoshiPj
@ParasJoshiPj 5 ай бұрын
Hi naveen request you to make Behave python framework.
@varunm0608
@varunm0608 3 жыл бұрын
I want to skip login pages and login functionality.How can we do that ?
@learnpythontogether4490
@learnpythontogether4490 3 жыл бұрын
AttributeError: 'SubRequest' object has no attribute 'params' How I fixed this error.
@praji1202
@praji1202 2 жыл бұрын
Where can i get the full code ?
@krish.s8601
@krish.s8601 4 жыл бұрын
Every test case app install newly (am using mobile testing on Pytest), how can i solve this , l'll try this {"noReset": True}
@vivanbasu551
@vivanbasu551 Жыл бұрын
ImportError while loading conftest 'C:\Users\*****\Desktop\IRCTC_Project_PYTEST\Tests\conftest.py'. Tests\conftest.py:5: in from Config.config import TestData E ModuleNotFoundError: No module named 'Config' Giving this error while running with the same folder structure. please provide solution
@rajkamalm420
@rajkamalm420 Жыл бұрын
Actually I am using Visual studio, followed your video, iam getting modulenotfound error. How to resolve it, can anyone please help me out
@xsoft7
@xsoft7 3 жыл бұрын
can you share a link to the files?
@sharatchandra2045
@sharatchandra2045 3 жыл бұрын
hi Naveen,nice content. do we have this code in github. can you pls share the link
@mudaseer21
@mudaseer21 4 жыл бұрын
nice
@Mayadani1945
@Mayadani1945 4 жыл бұрын
Hi Naveen I love your post always I real like it you so amazing person please i want to know where do you live second I real need you help regarding automation i have difficulties and i couldn't correct it on my automation in selenium i have this problem which is SLF4J FAILED TO LOAD CLASS ,SLF4J DEFAULTING TO NO-OPERATION where do i find dependence for some reason i couldn't find
@sudhanshukansal7169
@sudhanshukansal7169 4 жыл бұрын
Thanks Naveen
@ArturBerkut
@ArturBerkut 4 жыл бұрын
Thanks a lot
@muhammadasadtahir284
@muhammadasadtahir284 2 жыл бұрын
Please help me to resolve this error. Thanks C:\Users\Asad\Desktop\Python Automation Project\SQA_POM_Project>pytest C:\Users\Asad\Desktop\Python Automation Project\SQA_POM_Project\Test\Test_LoginPage.py 'pytest' is not recognized as an internal or external command, operable program or batch file.
@chiranjibisahu8092
@chiranjibisahu8092 4 жыл бұрын
👍
@Desiderio_space
@Desiderio_space 4 жыл бұрын
github please
@ManpreetKaur-cs5zx
@ManpreetKaur-cs5zx 4 жыл бұрын
🙏 thanks
@gasauer6995
@gasauer6995 2 жыл бұрын
Dude, slow down when you speak. You talk wicked fast!
@naveenautomationlabs
@naveenautomationlabs 2 жыл бұрын
check your playback speed once.
@duckboymiro3533
@duckboymiro3533 3 жыл бұрын
man your accent is terrible, try to like talk slower or something. but still thank you
@naveenautomationlabs
@naveenautomationlabs 3 жыл бұрын
Thanks for your suggestion but learn how to understand indian accent if you are watching indian youtube channel.
@raweth1
@raweth1 Жыл бұрын
@@naveenautomationlabs hey dude when the teacher speaks (u can use cc btw) , you listen! Awesome tutorial man!
Page Object Model - Python Selenium with PyTest - Part 2
24:33
Naveen AutomationLabs
Рет қаралды 24 М.
Session - 1 Selenium with Python
1:38:22
SDET- QA
Рет қаралды 667 М.
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
PyTest Tutorial For Beginners - Testing Framework For Python
1:23:54
Mukesh otwani
Рет қаралды 117 М.
Complete Page Object Model (POM) using Page Factory in Selenium
31:04
Mukesh otwani
Рет қаралды 275 М.
Part 1: PyTest : Python Test Framework Tutorials
20:37
Naveen AutomationLabs
Рет қаралды 79 М.
6 | Page Object Model | Selenium Python
29:57
Automation Step by Step
Рет қаралды 15 М.
Trump announced the end date of the war / Emergency plane landing
14:05
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 906 М.