How To Handle Google Search Functionality In Selenium With Java

  Рет қаралды 2,067

Mukesh otwani

Mukesh otwani

Күн бұрын

Пікірлер: 24
@naveenautomationlabs
@naveenautomationlabs 4 ай бұрын
Thanks for covering it. In utility function, better to pass By locator and String option (that needs to be clicked) and let the function create the List. TestClass/main() method just needs to maintain the By locators. public static void Search(By searchField, By suggestions, String searchKey, String suggName) { driver.findElement(searchField).sendKeys(searchKey); List suggList = driver.findElements(suggestions); System.out.println(suggList.size()); for (WebElement e : suggList) { String text = e.getText(); System.out.println(text); if (text.contains(suggName)) { e.click(); break; } } }
@Mukeshotwani
@Mukeshotwani 4 ай бұрын
Thank you Naveen bhai, yes it was quick video so could not add all variations. We can overload this methods with different signature.
@naveenautomationlabs
@naveenautomationlabs 4 ай бұрын
@@Mukeshotwani awesome video bhai :)
@Mukeshotwani
@Mukeshotwani 4 ай бұрын
@@naveenautomationlabs thank you sir ji complement from you made my day ♥️
@anouarchouikh2305
@anouarchouikh2305 4 ай бұрын
The best teacher ever! thank you for all what you do for the community Mukesh!
@Mukeshotwani
@Mukeshotwani 4 ай бұрын
So nice of you Anouar. it means alot to me.
@nayabshaik2282
@nayabshaik2282 2 ай бұрын
Last week, I searched for the same functionality, and I went through Naveen Bhai's video. I found it a bit difficult to write XPath for findelements. Somehow, I have completed work, but today, you made my life easy, Mukesh. You showed how simple we can write the XPath.
@Mukeshotwani
@Mukeshotwani 2 ай бұрын
Glad it helped Nayab bhai. Keep Learning.
@gnaneswararaodamodara1834
@gnaneswararaodamodara1834 4 ай бұрын
Thank you 👍 Mukesh for making useful videos😊 and you are the one of my fav tutor ❤️....
@Mukeshotwani
@Mukeshotwani 4 ай бұрын
Thank you so much Gnanesswararao 🙏🙏🙏 Keep watching and keep supporting 😇
@Nameskar
@Nameskar 4 ай бұрын
Very very thank you. Taking time adding this video very helpful.
@Mukeshotwani
@Mukeshotwani 4 ай бұрын
You are welcome! dear
@sonalagrawal1506
@sonalagrawal1506 4 ай бұрын
Very helpful video..thankyou mukesh!!
@Mukeshotwani
@Mukeshotwani 4 ай бұрын
@@sonalagrawal1506 most welcome Sonal 🙏 I am glad it helped
@RajibLama
@RajibLama 4 ай бұрын
Thanks Mukesh.
@Mukeshotwani
@Mukeshotwani 4 ай бұрын
Most welcome Rajib
@9745754904
@9745754904 4 ай бұрын
For search functionality automation, if data is not found it will throw nosuchelementexception ,so do we need to handle it and how?
@Mukeshotwani
@Mukeshotwani 4 ай бұрын
Hi Jino, you can add 1 extra check if list size is 0 then dont execute. FindElements will always returns List no exception. kzbin.info/www/bejne/jYGmqaCIirtod5I
@9745754904
@9745754904 4 ай бұрын
Thanks @Mukeshotwani😊,i had a functionality developed long back of adding a data with multiple fields in application.i created positive and negative test cases for those fields but once it was stable,i created a regression test case having a positive flow.But recently a prod issue came where user entered a negative data and didnt get the validation errror,Since negative testing we wont cover as a regression test case and it was missed in every regression cycle.So how to handle such scenarios?
@vipulpatil9151
@vipulpatil9151 3 ай бұрын
I am facing an issue where, after inputting eg-'Mukesh Otwani' in the search bar, the auto-suggestion dropdown disappears during inspection, making it difficult to capture the XPath for dynamic suggestions.what is the solution for that
@Mukeshotwani
@Mukeshotwani 3 ай бұрын
Hi Vipul, you can use debugger for the same. You can also use Selectorshub which can enable debugger. Here is the quick video for the same kzbin.info/www/bejne/jXnSdX2Xist9rtk
How To Use Collection Framwork In Selenium | List And Set In Selenium
35:00
Handle Dynamic Google Search Using Dynamic XPath - WebDriver Session - 15
21:51
Naveen AutomationLabs
Рет қаралды 169 М.
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
Automate Google Search API in Python
16:34
NeuralNine
Рет қаралды 44 М.
10 Common Selenium Techniques asked in recent interviews| 2024
18:45
Ajay Automates
Рет қаралды 3,6 М.
Switch to a specific window out of 100 windows and validate it in #Selenium
13:17
Handle disappearing search box or drop down elements using debugger
7:34
Naveen AutomationLabs
Рет қаралды 9 М.
Selenium Cucumber BDD Framework with Java and TestNG - Page Object Model | POM
24:59
SDET Adda For QA Automation
Рет қаралды 11 М.
Front-end web development is changing, quickly
3:43
Fireship
Рет қаралды 1,4 МЛН