Handle Dynamic Google Search Using Dynamic XPath - WebDriver Session - 15

preview_player
Показать описание
Handle Dynamic Search Using Dynamic XPath - Google Search:

Steps:
1. Google Search – pick a value from suggestions
2. Search using Xpath
3. Get the total count of suggestions
4. Use if condition to match the value
5. Click on matched value

===========================================

Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:

Follow me on my Facebook Page:

-~-~~-~~~-~~-~-
========================================================
Please watch: "Selenium & Automation Interview Preparation - By Naveen AutomationLabs"
-~-~~-~~~-~~-~- Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:

Follow me on my Facebook Page:

Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:

Paid courses (Recorded) videos:
📗 Get My Paid Courses at
Paid courses (Recorded) videos:
-------------------------------

✔️SOCIAL NETWORKS
--------------------------------

Support My Channel✔️Or Buy Me A Coffee
--------------------------------
✔️Thanks for watching!
देखने के लिए धन्यवाद
Благодаря за гледането
感谢您观看
Merci d'avoir regardé
Grazie per la visione
Gracias por ver
شكرا للمشاهدة
Рекомендации по теме
Комментарии
Автор

During Coaching my Selenium, my Guru said this program. After see this video I recall that class memory. Thanq @naveen

hrusikeshbisoyi
Автор

Dude, you freakn rock. keep continuing to help aspiring us to become proficient in Selenium!

shaibalahmed
Автор

this video made my morning :) Very informative and "wowww" video.. Thank you so much Naveen... we all are blessed to have you as our guide....

priyankadawane
Автор

Thanks Naveen for such wonderful explanation. I love to watch your videos. Your teaching method is very interesting.

rrrindia
Автор

It's an amazing session to generate customised Xpath.

MayurJain-my
Автор

Hi Naveen, Amazing explanation all appreciate your efforts.
Thank you.

srinathsrinath
Автор

hi naveen sir.. really u have great knowledge and ur spreading ur knowledge with all..Thank u so much sir...

santhoshk
Автор

Excellent bro, what an explanation. Interesting and Understanding.

nagarjunababu
Автор

Thanks a lot Naveen. Very good topic you have covered. Keep it up😊

omkarpotdar
Автор

I am learning very much from your videos and day by day my concepts are getting cleared.thank you so much for point to point explanation and hates of for your great efforts.

roshnichhajed
Автор

Naveen thanks you are excellent skills in automation testing

arunprakash
Автор

Thanks, it is so detailed and covering all points.

ammuannie
Автор

I am watching your selenium videos.and believe me I'm becoming too good in selenium day by day. Your videos are very clear, concise and to the point. And these days, I'm attending interviews.

I have couple of doubts. Please help me to clear.
1. Why I always need to launch new browser every-time when I run selenium code. Why I won't run the selenium code in the same browser in which which I am currently working with my stuffs.

--->Is there any method to do the same? Then please make a video tutorial to explain.

2. Is there any method to fetch our the list of navigated browser history?

Waiting for your reply.And Thank you so much for such amazing and cost free content

vishakhasinha
Автор

Hi Naveen, I have tried the tutoria, my doubt:
Here is the WebElement
<li data-view-type="1" class="sbct" role="presentation" xpath="1">
<div class="eIPGRd"><div class="sbic sb43"></div>
<div class="pcTkSc" role="option">
<div class="wM6W7d">
<span>testing
<b> openings in chennai</b>
</span>
</div>
<div class="ClJ9Yb" style="display: none;">
<span></span>
</div>
</div>


In the above Webelement i am trying to use the code in Selenium


Code in selenium:

System.out.println("Total number of suggestions in search box:" + list.size());

Output:

Total number of suggestions in search box:0

It is showing me 0 count but in chrome i can see 10 count.
can you tell me whether my Custom Xpath is wrong ?

avengers
Автор

Hi Sir, very nice video andinformative I am new to selenium learning through your video are clearing my doubts in much better way . can you please explain more for descendant in which scenarios we use descendant in xpath .

ankitarathore
Автор

Naveen, your tutorials are very helpful. Thank you very much

zuzanafarkasova
Автор

Naveen how did u selected the whole box before inspecting, i m sorry i cant do that like i search testing and the options came in the box i can nor select the whole box thats y i cant inspect. Can someone help here, sorry m still learning.

amiereviews
Автор

Really appreciable, Amazing explanation

reshmasyed
Автор

Those who are facing issue and confused with span tag in between can try this xpath:-

imabhi
Автор

Hi Naveen,
This is the exception i m getting while clicking on the second search bar on google.com

Steps of my program:

search for java on google home page search bar
choose java programs from suggestion and click
click on searchbar
choose java programs pdf from suggestion

Exception in thread "main" stale element reference: element is not attached to the page document
(Session info: chrome=64.0.3282.119)
(Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f), platform=Windows NT 10.0.16299 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
System info: host: 'F208', ip: '10.10.20.33', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_152'
Driver info:
Capabilities {acceptSslCerts: true, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.33.506120 (e3e53437346286..., userDataDir: C:\Users\Sneha\AppData\Loca...}, cssSelectorsEnabled: true, databaseEnabled: false, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour:, unhandledPromptBehavior:, version: 64.0.3282.119, webStorageEnabled: true}
Session ID:
at Method)
at Source)
at Source)
at Source)
at
at
at
at
at
at
at
at
at
at
at
at

please help me where did i went wrong i am not able to find the solution for this. Tried keeping static wait but still the exception remains same

snehakejriwal