Dynamic XPath in Selenium using Different Approaches

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ก.ค. 2024
  • Do you know how to write Dynamic xpath in Selenium Webdriver? In this video, we will mainly discuss XPath different methods which will help us to write Dynamic XPath while creating Selenium script.
    Please use below link for xpath
    learn-automation.com/how-to-wr...
    ~-~~-~~~-~~-~
    Please watch: "How To Create Maven build For Selenium Framework"
    • How To Create Maven bu...
    ~-~~-~~~-~~-~
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 227

  • @karthickshiva2671
    @karthickshiva2671 6 ปีที่แล้ว

    Once I thought I can never learn Selenium, now you are also one of the reason where i started automating some web pages. thanks brother you are awesome

  • @prc6075
    @prc6075 6 ปีที่แล้ว

    Hi Mukesh
    What will be the xpath for getting the dynamic id of the radio button.
    Here i enter data (4 text boxes) and click on add button, the data is added and displayed with a radio button.
    If i add 2 times then 2 rows of data added with radio button for each row of data (e.g. radio0 and radio1).
    so to delete that row i have to selet radio button and click delete button.
    Now how to select radio1 and delete that row?? I tried with xpath but not able to do it.

  • @gnreddyk7866
    @gnreddyk7866 7 ปีที่แล้ว +1

    Dear Mukesh,Investing your time to fulfill our minds with these concepts is Awesome task..We are grateful to your time..With folded hands ..thanks alot .

    • @Mukeshotwani
      @Mukeshotwani  7 ปีที่แล้ว

      Your most welcome mate :) Kindly share with your friends too.

  • @aishwaryapathak553
    @aishwaryapathak553 7 ปีที่แล้ว +1

    Hi Mukesh ,
    Just wanted to appreciate the way of teaching and explaining you do.
    I enrolled for selenium class room training but your online sessions proved to be more effective.
    Thanks

    • @Mukeshotwani
      @Mukeshotwani  7 ปีที่แล้ว

      Hi Aishhwarya,
      Thank you so much :) I am glad it helped you. Keep visiting and Happy Weekend.

  • @SouravGhosh-pb5nm
    @SouravGhosh-pb5nm 6 ปีที่แล้ว +1

    Thanks Mukesh. Very helpful.

  • @sangeetham3533
    @sangeetham3533 5 ปีที่แล้ว

    Hi mukesh, how can i compare string value and webelement in if condition ,suppose i want to compare actual and expected ,actual is string and expected is of type webelement.please suggest me

  • @vamsi476giet
    @vamsi476giet 8 ปีที่แล้ว

    The most important thing in selenium is to find the element and thanks for explaining it in very detailed manner

  • @mohammedmoosasharieff1816
    @mohammedmoosasharieff1816 4 ปีที่แล้ว +1

    Thanks Mukesh...
    Wanted to learn writing xpath since months!
    The video has been helped a lot.

    • @Mukeshotwani
      @Mukeshotwani  4 ปีที่แล้ว

      Thanks Moosa, I will glad you understood Xpath concept.

  • @SagarKumar-rg8xc
    @SagarKumar-rg8xc 6 ปีที่แล้ว

    very well explained, good learning from you

  • @khyatisingh404
    @khyatisingh404 3 ปีที่แล้ว

    Sir I love you !u have given me a solution thank you!

  • @rekham9489
    @rekham9489 8 ปีที่แล้ว

    Very Nice and easy to understand....best tutorials. Thank You Mukesh Sir :-)

  • @Iceeboltt
    @Iceeboltt 3 ปีที่แล้ว

    Hey Mukesh so what is wrong if we use the same xpaths why we need to customize xpaths what is the benefit in that for a tester ?

  • @chandanrai6302
    @chandanrai6302 6 ปีที่แล้ว

    hi sir thanks for your video,please clear my one doubt if in web table duplicate name is available and unique transation id is available then how to verify the data on the basics of the transation id please let me know
    REPLY

  • @ajaysuresh3781
    @ajaysuresh3781 4 ปีที่แล้ว +1

    Thanks Mukesh. Your tutorials are really helpful and informative

  • @vrjosyula
    @vrjosyula 8 ปีที่แล้ว +1

    Thanks a lot Mukesh. This video cleared a lot of my doubts and gave a lot of insight.

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      +vrjosyula let me know if any help from my side.

  • @saiputlur
    @saiputlur 7 ปีที่แล้ว +1

    thats very precise and clear explanation. easily understandable. thanks a lot.

    • @Mukeshotwani
      @Mukeshotwani  7 ปีที่แล้ว

      Hey Krishna Thank you :) I am glad it helped you. Keep visiting.

  • @siyarsahar9954
    @siyarsahar9954 4 ปีที่แล้ว

    Dear Mukesh Thanks for all the videos you make! in 23 rd minute, you talk about if id is dynamic, so we use starts-with, but you forget to write starts-with and you write contains.

  • @towhidskynet
    @towhidskynet 7 ปีที่แล้ว

    12:15, 16:00, 9:00, 20:50,25:00
    Very good examples of :
    1. how to see number of matching nodes
    2. use of and or logic
    3. use of text() and contains(), starts-with() method.
    4. use of following

  • @nikhiltinku3232
    @nikhiltinku3232 4 ปีที่แล้ว +1

    Thankyou Mukesh, your videos are really helpful.

  • @ramgupta4567
    @ramgupta4567 7 ปีที่แล้ว

    Nice video on Xpath.Thanks Mukesh

  • @najeebzahed6348
    @najeebzahed6348 6 ปีที่แล้ว

    For the example you used on 16:27 here's the XPath I use able to use today:
    //td[@class='t posts']//a[contains(text(),'Posts')]

  • @pratikkhakria6319
    @pratikkhakria6319 7 ปีที่แล้ว

    Wonderful Mukesh.
    This video is awesome.
    :)

  • @seetalbachu758
    @seetalbachu758 8 ปีที่แล้ว +1

    Very good tutorial. Easy to understand.

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      +Seetal Bachu Thanks Seetal keep visiting :)

  • @LINGAREDDYSabbasani
    @LINGAREDDYSabbasani 7 ปีที่แล้ว

    Very good explanation thank you !!

  • @PradeepChauhan17
    @PradeepChauhan17 6 ปีที่แล้ว

    Very informative video. Thank you for this.
    Few questions: 1. (Ref:17:48) At some place you mentioned @name='value'. At another you mentioned @href, 'edit.php'. The = is not mandatory? Where all it's used?
    2. (Ref:17:40) How to find how many methods (like contains, text, etc.) are available?
    3. On FireFox 59 (Quantum) how do I per a search for the XPath ? Do I see a similar search box like I see in FireBug/FirePath which is incidentally not supported.

  • @AJAUTOMATION
    @AJAUTOMATION 4 ปีที่แล้ว +2

    Brilliant job Mukesh..I have learnt a lot from you..
    #AjAutomation

  • @rd669
    @rd669 7 ปีที่แล้ว +1

    very useful video. Thank you so much Mukesh!

  • @srinivastrully3789
    @srinivastrully3789 7 ปีที่แล้ว

    HI Mukesh, Is XPATH value depends on the browser ? I have heard that, xpath found in FF is different to the one in IE; Is this true?

  • @chaitanya2590
    @chaitanya2590 8 ปีที่แล้ว

    Video was very helpful , Thank you!

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      +Chaitanya G.A Your most welcome let me know if any help from my side.

  • @chinmayachittaranjanjena2575
    @chinmayachittaranjanjena2575 8 ปีที่แล้ว +1

    Good Tutorial, understood how to make xpath

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      +Chinmaya chittaranjan jena Thanks Chinmaya

  • @grijeshmnit
    @grijeshmnit 7 ปีที่แล้ว +1

    Thanks Very much. You saved my lots of time and efforts (y)

  • @MyGreatAchievers
    @MyGreatAchievers 8 ปีที่แล้ว +1

    My hunt for XPATH ends here Mukesh...u r simply awesome.....Disappointed as there are only 29k views....deserves more...

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      Thanks Rao :) Views are less but user attention is high. Keep visiting

  • @asmarazaq9122
    @asmarazaq9122 5 ปีที่แล้ว +1

    Thankyou Mukesh, it was really helpful

    • @Mukeshotwani
      @Mukeshotwani  5 ปีที่แล้ว

      Most welcome Asma... keep learning.. Happy to see that you are learning over weekend 😃

  • @MukeshKumar-iw7rr
    @MukeshKumar-iw7rr 6 ปีที่แล้ว

    Hi Mukesh, thanks for this video. Can you upload videos on how to find xpath for SVG and AngularJS as well.

  • @lavanyaaparamanandham4088
    @lavanyaaparamanandham4088 4 ปีที่แล้ว

    Hi Mukesh, I am new to selenium, I am practicing to write my own xpath in your blog. I am trying to mouse hover to automation tools tab, I am trying to create my own xath for that, but I am getting error. can you please help me action.moveToElement(driver.findElement(By.xpath("//a[contains(text(),'Automation Tools')]"))).build().perform();. the error I am getting is unable to locate element.

  • @ppatel332
    @ppatel332 6 ปีที่แล้ว +1

    Thanks sir. This video is really useful.

    • @Mukeshotwani
      @Mukeshotwani  6 ปีที่แล้ว

      Welcome, Parthiv... Please keep visiting...

  • @MdAlam-ie7fg
    @MdAlam-ie7fg 7 ปีที่แล้ว +1

    Hey, Mukesh thank you very much, its really helpful

  • @mykyramylife
    @mykyramylife 7 ปีที่แล้ว +1

    Thanks Mukesh, very useful.

  • @towhidskynet
    @towhidskynet 7 ปีที่แล้ว

    do you still have this workdpress site? if so, could you please post the link ? Thanks

  • @seemaahuja1750
    @seemaahuja1750 7 ปีที่แล้ว +1

    Thanks a lot mukesh for this excellent vedio

    • @Mukeshotwani
      @Mukeshotwani  7 ปีที่แล้ว

      +Seema Ahuja thank you Seema keep visiting and let me know if any help required from my side.
      Happy weekend

  • @muthuvel2390
    @muthuvel2390 7 ปีที่แล้ว

    hi mukash thanks for your video it is very helpful and i have one doubt if xpath values are changed dynamically interviewer asked that question so i dont know how to answer ths question so please.

  • @sudhakark8386
    @sudhakark8386 7 ปีที่แล้ว

    Hi mukesh I am unable identify the drop down element.
    I.e //div[@class='mclc' and text()='002region']
    how to identify this one..
    could you please help me.

  • @bibhutijha1113
    @bibhutijha1113 7 ปีที่แล้ว

    Hi Mukesh ,
    Basically I am QTP tester and i have started learning selenium recently .
    So i would like to know if there is any like register user function which is used in QTP through which we can check the object existence or perform any action without writing the codes again and again we have to write a single function then we have to pass the object to that function and the required action is performed .
    So can we do it in selenium ?
    let me given an example :-
    WebElement UserName = driver.findElement(By.xpath("//*[@id='user_login']"));
    if (UserName.isDisplayed()){
    UserName.sendKeys("admin");
    }
    So i want i dont have to write these 3 above line . i will just pass xpath , value , varaible name.
    please help

  • @atulthorat5670
    @atulthorat5670 3 ปีที่แล้ว +2

    Thank you Mukesh..!

  • @pinkisukhwani9600
    @pinkisukhwani9600 7 ปีที่แล้ว +1

    Hi Mukesh,
    you are doing great ...!! can you pls make video on "Parameterizing xpath"

  • @manishrajurkar8161
    @manishrajurkar8161 5 ปีที่แล้ว +1

    HI Mukesh, In Salesforce Lightning mode, with AURA framework, there are no unique attributes identified. we are taking reference of the preceding /following and taking index number element to generate XPath. However, there are still more challenge, the XPath you design will not work next time on UI index get changed. are there any best practice to deal with this situation?

    • @Herrmann2k
      @Herrmann2k 5 ปีที่แล้ว +1

      I am also facing the same issue using Salesforce Lightning, the index gets changed after a few runs. can you please suggest how do we deal in this?

    • @lorenzovidaurre1491
      @lorenzovidaurre1491 5 ปีที่แล้ว

      Hola a todos!! me sucede lo mismo, si tiene alguna ayuda comenten, por favor

    • @lorenzovidaurre1491
      @lorenzovidaurre1491 5 ปีที่แล้ว

      con este Xpath //a[@class='select' and @xpath='1'] puedo encontrarlo en ChroPath el elemento buscado, pero cuando lo ingreso en el Xpath muestra error Select drpCountry = new Select (driver.findElement(By.xpath("//*[@class='select' and @xpath='1']")));

  • @vishavgupta3717
    @vishavgupta3717 4 ปีที่แล้ว

    Thank you very much

  • @momomeshtv7318
    @momomeshtv7318 3 ปีที่แล้ว +2

    can we find the xpath of facebook video / post comments? it appears to be a list or something that needs to click before it expands out.... furthermore it doesn't show ALL the comments you have to click on the view more to get all.... is that doable with selenium?

    • @Mukeshotwani
      @Mukeshotwani  3 ปีที่แล้ว +1

      Hi Buddy please check this www.selenium.dev/documentation/en/worst_practices/gmail_email_and_facebook_logins/

  • @RajuDas-zn3gx
    @RajuDas-zn3gx 5 ปีที่แล้ว

    Mukesh, for my application I have written a xapth to identify a label as //td[text()=‘CK_SUM’] and this works good for chrome but does work for ie. can you please help me to fix this?

    • @vishwa2433
      @vishwa2433 5 ปีที่แล้ว

      Xpath for ie some time change, check the unique identifier for parent /grand parent and find the child td

  • @kokilajs7796
    @kokilajs7796 3 ปีที่แล้ว +1

    Hello sir, I have to write the dynamic xpath so that everytime it should increment and pass that value to xpath and this xpath finding can go upto 2 or 3 pages

    • @Mukeshotwani
      @Mukeshotwani  3 ปีที่แล้ว

      Yes Kokila what issue you are facing?

  • @Deliquesent
    @Deliquesent 4 ปีที่แล้ว +1

    What is the need of using OR and AND functions in Xpath. If we can find a webelement with 1 unique attribute, then is there a need to specify the other attribute too?

    • @Mukeshotwani
      @Mukeshotwani  4 ปีที่แล้ว

      Hi Sakshi, in case if one attribute changes so other will be used for identifying web elements.

  • @and7998
    @and7998 8 ปีที่แล้ว

    Awesome video! keep up the good work. Can you also upload a tutorial on how to work with s and windows handles in selenium?

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      +Anu Dube Hi Anu for frames will upload tomorrow. For window handle please refer below link.
      Note- Please use headphones for this video voice is very low.
      th-cam.com/video/IcAD_eI50v8/w-d-xo.html

  • @dbvs007
    @dbvs007 8 ปีที่แล้ว

    Very useful thanks Mukesh

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      +Bhanu Surendra THanks Bhanu keep visting

  • @siddeshwarmithbavkar4232
    @siddeshwarmithbavkar4232 6 ปีที่แล้ว +1

    Really awesome!!

  • @abhisheknimbalkar8509
    @abhisheknimbalkar8509 8 ปีที่แล้ว +2

    Thanks Mate... Xpath was never so easy to understand. Keep up the great work ...

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      +Abhishek Nimbalkar Thank you Abhishek :)

  • @baldygaming2226
    @baldygaming2226 7 ปีที่แล้ว

    Hi mukesh, im having trouble with xpath, my issue is this. it works perfectly fine with firefox but then it comes to chrome it gives me this kind of error
    org.openqa.selenium.WebDriverException: unknown error: Element ... is not clickable at point (1364, 408). Other element would receive the click: ...
    im just confused why?
    Thank you again mukesh have a blessed day

  • @AbhishekGupta-kn8pv
    @AbhishekGupta-kn8pv 8 ปีที่แล้ว +1

    It was quite knowledgeable...waiting for another one..However I would request to upload a video on CssSelectors also...Thanks.

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      +abhishek gupta CSS will updoad next weekend

  • @nihardash9619
    @nihardash9619 4 ปีที่แล้ว +1

    Hi Mukesh,the website you are using for example not working in google chrome(wordpress),can u use some other geninue websites which are working in google chrome and explain the same things .Thanks for your videos

    • @Mukeshotwani
      @Mukeshotwani  4 ปีที่แล้ว

      Hi Nihar, you can use this application for testing opensource-demo.orangehrmlive.com/

  • @joyitaroy123
    @joyitaroy123 3 ปีที่แล้ว +2

    Hi Mukesh...I was working on drop down automation. I took the example of registration page of FB. But it has been changed to a registration pop up box unlike before. I went through your fb drop down(dob)handling video. But now when I click on create new account button from homepage one registration pop up is opening. I am not getting control of the pop up window and unable to select drop down or write text in the text box. Tried everything. Is it possible to automate the pop up form without using javascript? Please help me.

    • @Mukeshotwani
      @Mukeshotwani  3 ปีที่แล้ว +3

      Hey Joyita Here is the code which is working fine
      WebDriver driver=new ChromeDriver();
      driver.get("facebook.com");
      driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
      driver.findElement(By.xpath("//a[text()='Create New Account']")).click();
      driver.findElement(By.name("firstname")).sendKeys("Mukesh");
      Select bday=new Select(driver.findElement(By.name("birthday_day")));
      bday.selectByValue("10");

    • @Mukeshotwani
      @Mukeshotwani  3 ปีที่แล้ว +1

      You need to add implicit wait in your script which can prevent script failure. When we click on create button then it take 2-3 second to bring the pop up. Do watch this video for implicit wait th-cam.com/video/iR0gfRGjW98/w-d-xo.html

    • @joyitaroy123
      @joyitaroy123 3 ปีที่แล้ว +1

      Thanks a lot Mukesh. I haven’t seen your reply. Just today I tried with your code. It’s working now 🙂

    • @Mukeshotwani
      @Mukeshotwani  3 ปีที่แล้ว

      No problem it happens. I am glad it worked 😌

  • @santosh830
    @santosh830 7 ปีที่แล้ว

    In hybrid driven framework,why did you use local driver in homepage.your explanation is excellent.thank you

  • @himanshuthakur1605
    @himanshuthakur1605 7 ปีที่แล้ว

    hi mukesh . An interviewer ask me how to handel if there is suppose in one row display ''himanshu'' as link and next to column again ''himanshu'' as a text and below this row in another row written ''himanshu'' as text and next to another column ''himanshu'' as link. then how will be locate ''himanshu'' in 2nd row first column then click on link ''himanshu'' in 2nd column with out using xpath or other locator? this kind of scenario was there? Pls help me

    • @nmkkannan1256
      @nmkkannan1256 7 ปีที่แล้ว +1

      Use findElements(By.linkText()). Use index to specify

  • @gavishwa
    @gavishwa 6 ปีที่แล้ว +1

    Nice One Mukesh.Thanking you for sharing the info. From FireFox v 57 we do not have support for Fire Bug. Could you please share more info on how to get the x path by using fire fox v 57..

    • @praveen420ify
      @praveen420ify 6 ปีที่แล้ว

      1. Open mozila Developer window.( Press f12)
      2. Spy on required Element.
      3. right click on Path comes in Developer window after spying element
      4. Click COPY option and then U can select xpath( Or other locator options)

  • @vvkkumar3691
    @vvkkumar3691 5 ปีที่แล้ว +1

    "org.openqa.selenium.ElementNotInteractableException: Element is not reachable by keyboard" . I am getting this error could you help me.

    • @Mukeshotwani
      @Mukeshotwani  5 ปีที่แล้ว

      HI Kumar please check below link learn-automation.com/invalidelementstateexception-in-selenium-webdriver/

  • @90ankush
    @90ankush 8 ปีที่แล้ว

    Hi Mukesh,
    In other video you explained the exception which comes when we use FF 47 and selenium 53. So as per you i degraded FF to 46.0. It worked perfectly fine for a day or two. But again it started throwing org.openqa.selenium.firefox.NotConnectedException.
    Could you please help here .
    Thanks !!
    Ankush

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      Stick to 45 and Selenium 2.53 which will make test stable.

  • @keshojukavya2830
    @keshojukavya2830 4 ปีที่แล้ว +1

    Hi Mukesh, How do we create xpath in chrome? Because there is no firebug in firefox now. Please help

    • @Mukeshotwani
      @Mukeshotwani  4 ปีที่แล้ว

      Here is the link th-cam.com/video/9N7ERYWbjuw/w-d-xo.html

  • @bobin1619
    @bobin1619 7 ปีที่แล้ว +1

    good explanation..

  • @sajeerkunnoth6630
    @sajeerkunnoth6630 5 ปีที่แล้ว +4

    In this video, 16 second's you are explaining how to use contains, but it's not working because you have used "//input[contains(@name='post_title')] " In my understanding if your using contains you have to use coma. Eg: //input[contains(@name='post_title')]

    • @Mukeshotwani
      @Mukeshotwani  5 ปีที่แล้ว

      Hi Sajeer Thank you for correcting me.

  • @purusingh2793
    @purusingh2793 6 ปีที่แล้ว

    i am not getting the html content pls help me..........

  • @tarunakalra8993
    @tarunakalra8993 4 ปีที่แล้ว +2

    Hi Mukesh ..Your sessions are really helpful but it would be good if you write sequence number of sessions for beginners.

    • @Mukeshotwani
      @Mukeshotwani  4 ปีที่แล้ว

      Thanks Taruna, sure I will make them is sequence soon.

  • @shivuvali
    @shivuvali 7 ปีที่แล้ว +1

    hi mukesh..what is the version of the FF you have used in the above tutorial.

  • @nitingupta82
    @nitingupta82 8 ปีที่แล้ว

    Another excellent video Mukesh! But please help me explain the difference when we are using the text() method.
    There are 2 ways it shows for text() ' = ' & ' , ' .
    One form is //a[contains(@href, 'edit.php'')][text() = 'Posts'] and other is //a[contains(text(), 'Dismiss this message')]
    Am not sure which method should we follow = or , after text() method.
    Is there any standard that must be followed or it's more of hit n trial in particular for text() method?

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว +1

      +Nitin Gupta Hi Nitin let me clear it
      Text()- This will chek for exact text and if found then only it will return result.
      while
      contains(text(),'')- it only check partial text

  • @ravi_nelluri
    @ravi_nelluri 8 ปีที่แล้ว +1

    In my application I have two fields say Email id and Conform Email id . For both of them id,class name everything is same. In this situation who can i find specific test box

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      +Ravi Nelluri in part 2 I have covered this scenario please visit part2

  • @arijitbhattacharjee5243
    @arijitbhattacharjee5243 7 ปีที่แล้ว +1

    Hi Mukesh Sir,
    Thank you so much. Its really helpful. But i have one query:
    How to handle auto-suggest search drop down in selenium webdriver?
    Can you please guide.

    • @Mukeshotwani
      @Mukeshotwani  7 ปีที่แล้ว

      You can use findElements method and list concept in Selenium to handle autosuggestions.

  • @lalitkumar2855
    @lalitkumar2855 6 ปีที่แล้ว

    Hi Mukesh, can you please help me get xpath to log into Paytm?

  • @sudheer1330
    @sudheer1330 8 ปีที่แล้ว

    Hi Mukesh,
    While adding Assert, am getting error "This element neither has attached source nor attached Javadoc and hence no Javadoc could be found.". could you please help.

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      You can attach SRC jar then this error wont come

  • @prasanthsp7694
    @prasanthsp7694 2 ปีที่แล้ว

    How to take XPath for this text (Today's Deals) by using text XPath.

  • @Jayakrishna-ly3ei
    @Jayakrishna-ly3ei 3 ปีที่แล้ว +1

    4:38 hi sir,
    1st we write username, we gave a tab button, now we are in password textbox,we send data now in this . how to write the program for this ?

    • @Mukeshotwani
      @Mukeshotwani  3 ปีที่แล้ว +1

      You can use sendKeys with Keys option or Actions class.

    • @Jayakrishna-ly3ei
      @Jayakrishna-ly3ei 3 ปีที่แล้ว

      @@Mukeshotwani I tried sir I am not getting. Can u send me that 4 or 5 lines code sir ?

  • @narasimhareddy1103
    @narasimhareddy1103 6 ปีที่แล้ว +1

    Nice Video Mukesh. I am facing difficult in identitifying the xpath for an element called "My Account" button in the home page of the url "www.phptravels.net/".
    I have tried using Firebug and absolute Xpath. The problem is in webpage the Web Element is highlighted but during run time the WebDriver is unable to Identity the button. Please Help.

  • @sankassasenevirtha2049
    @sankassasenevirtha2049 4 ปีที่แล้ว +1

    Really helpfull

  • @lakshmisatti2588
    @lakshmisatti2588 5 ปีที่แล้ว +1

    if we dont use firebug addin how derive xpath with our wonself

    • @Mukeshotwani
      @Mukeshotwani  5 ปีที่แล้ว

      Hi Lakshmi we have new plugin for xpath now th-cam.com/video/kjTsGnkPQEc/w-d-xo.html

  • @KevinLi-wx1kq
    @KevinLi-wx1kq 8 ปีที่แล้ว +1

    Any info about how to handle svg object/graph (using css/xpath) in Webdriver?

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      +Kevin Li Hi Kevin,
      Any example of SVG objects?

  • @lakshmisatti2588
    @lakshmisatti2588 5 ปีที่แล้ว +1

    can u upload all ur selenium clases in sequential mannaer we not able to find ur all videos regarding selenium

    • @Mukeshotwani
      @Mukeshotwani  5 ปีที่แล้ว

      Hi Lakshmi I will rearrange them soon

  • @piyushratnam5490
    @piyushratnam5490 8 ปีที่แล้ว

    Hi Mukesh,
    Thanks for this Video, you have nicely explained everything, learnt a bit more about writing XPATHs. One thing stroked my mind - Does HTML have a tag as well, got confused with below example, Syntax : //tagname[starts-with(@attribute-name,’’)]
    e.g. //id[starts-with(@id,’’)]

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      Hi Piyush,
      HTML is the parent tag but it does not have any id. Xpath examples will be applicable for other elements.

  • @parulisha
    @parulisha 7 ปีที่แล้ว +1

    Hi
    Can you help writing the code if there are 100 text fields on one Page and we want to count the number of such fields which are purgent?
    Thanks

    • @Mukeshotwani
      @Mukeshotwani  7 ปีที่แล้ว +1

      Hi Parul nice question you can use findElements and then size method to get the count learn-automation.com/difference-between-findelement-and-findelements-in-selenium-webdriver/

    • @parulisha
      @parulisha 7 ปีที่แล้ว

      Thanks Mukesh.

    • @Mukeshotwani
      @Mukeshotwani  7 ปีที่แล้ว

      Cheers

  • @joshnaranimohapatro4132
    @joshnaranimohapatro4132 4 ปีที่แล้ว +1

    please give me the link ,for learn automation for dynamic x path

    • @Mukeshotwani
      @Mukeshotwani  4 ปีที่แล้ว

      Hi Anjali, here is the link learn-automation.com/how-to-write-dynamic-xpath-in-selenium/

  • @subhasisrupali
    @subhasisrupali 7 ปีที่แล้ว +1

    Hey Mukesh - Any idea if firebug has been merged with firefox developer tool? I have FF 51 on my laptop and firebug 2.0.18 is deactivated. There is no way for me to check the xpath. Can someone please help on this.

    • @Mukeshotwani
      @Mukeshotwani  7 ปีที่แล้ว +1

      Hi Subhasis, Kindly use FF 48 or 50 then install firebug from add on it is working for me.

    • @chetu19
      @chetu19 7 ปีที่แล้ว +1

      ftp.mozilla.org/pub/firefox/releases/ Firefox release versions.

    • @prashanttiwari5855
      @prashanttiwari5855 7 ปีที่แล้ว +1

      Hi Subhasis, you have install the older version 50.1.0 for FF. the latest version is not supporting firebug.

    • @pushpaksharma9906
      @pushpaksharma9906 7 ปีที่แล้ว +1

      Hi Subhasis,
      Please perform the below steps
      1. Open a new tab in the browser
      2. type about:config
      3. Now search for browser.tabs.remote.autostart
      4. Toggle the value to False
      Hope this will work

    • @Mukeshotwani
      @Mukeshotwani  7 ปีที่แล้ว

      Use FF 46

  • @dbvs007
    @dbvs007 8 ปีที่แล้ว

    Syntax seems incorrect when we want to use multiple attributes(video @11:14 min) , @ symbol is missing for the 2nd attribute.... Thanks

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      +Bhanu Surendra I will make changes

  • @TheArian291
    @TheArian291 6 ปีที่แล้ว

    Hi Sir, supposing I've the values 1234 is changing every time so will the below xpath work out?
    //*input[contains(@id,'abc')] or i need to give some other changes.. pls help

    • @iliyas868
      @iliyas868 6 ปีที่แล้ว +1

      this should work considering no other element consists of an ID having the string 'abc' in it. Correct me if i'm wrong!

    • @vishwa2433
      @vishwa2433 5 ปีที่แล้ว

      Use starts-with instead of contain, as your element id begins with abc.... Also if you find any where else on page these sort of ids are shown start custome xpath at unique parent or frand parent and then find id starts-with abc

  • @Bujji28243
    @Bujji28243 7 ปีที่แล้ว +1

    we have two fields username and password ,but our attribute both r same example id=ABC, both username and password attribute s r same then how we can pass text only one field username???how to write xpath???

    • @Mukeshotwani
      @Mukeshotwani  7 ปีที่แล้ว

      Hi Nagu,
      You can use findElements and get the index and play with web elements.

    • @Bujji28243
      @Bujji28243 7 ปีที่แล้ว

      Thanks for giving a reply but little bit confusion, how to perform index number can you write sample code for me, please......

  • @mastanmmr374
    @mastanmmr374 7 ปีที่แล้ว +1

    hi mukesh'
    when to use absolulative & relative xpath

    • @Mukeshotwani
      @Mukeshotwani  7 ปีที่แล้ว

      It is up to your requirement I use combination of both.

  • @tomg2982
    @tomg2982 7 ปีที่แล้ว +1

    Hi Mukesh, This is really good tutorial, thank you.
    Could you please explain how to find xpath for elements which are repeated several times in several the same tagnames ex:
    for odds in bet365 : the following sentence :
    10/1 is repeated over 10 times.
    How to write xpath for the one interresting me?
    Regards: Tom

    • @ravikumar-sharma-k
      @ravikumar-sharma-k 7 ปีที่แล้ว

      Tomasz G use xpath like this:WebElement element = //*[@class=gl-Participant_Odds].It will find all elements with that class.

    • @ravikumar-sharma-k
      @ravikumar-sharma-k 7 ปีที่แล้ว

      Tomasz G use xpath like this:WebElement element = //*[@class=gl-Participant_Odds].It will find all elements with that class.

  • @mushfiquazaman9597
    @mushfiquazaman9597 8 ปีที่แล้ว

    Helo Mukesh,your videos are so wonderful, But I cannot access learn-automation.com site. isn't it open for everybody. Please help. Thanks.

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      Thanks Zaman, There was some maintenance so blog was down,

  • @sanjeevgautam90
    @sanjeevgautam90 8 ปีที่แล้ว

    Hello sir,
    I can't able to login on www.demosite.center/wordpress/wp-login.php
    with user id: admin & Password : demo123
    It's showing 404 error

    • @Mukeshotwani
      @Mukeshotwani  8 ปีที่แล้ว

      Hey Sanjeev kindly use below site for demo demo.avactis.com/4.7.9/

    • @priyankag2354
      @priyankag2354 7 ปีที่แล้ว

      hi mukesh !This is also not working

  •  7 ปีที่แล้ว

    how i get this addon to firefox ??
    please help me

    • @arsaurabh6044
      @arsaurabh6044 7 ปีที่แล้ว

      www.techbeamers.com/use-firebug-and-firepath-in-firefox/

  • @dilshodalikiulov2150
    @dilshodalikiulov2150 7 ปีที่แล้ว +1

    Thanks

    • @Mukeshotwani
      @Mukeshotwani  7 ปีที่แล้ว

      +Dilshod Alikiulov welcome mate

  • @hakan2048
    @hakan2048 5 ปีที่แล้ว +1

    How do I capture dynamic id.

    • @Mukeshotwani
      @Mukeshotwani  5 ปีที่แล้ว

      Hi Tektas any example so that I can show you the solution..

    • @hakan2048
      @hakan2048 5 ปีที่แล้ว

      I can't share the code, but there is a situation. The input screen also changes the ID page every time you refresh.

    • @kalyantpv
      @kalyantpv 5 ปีที่แล้ว +2

      I had a similar situation where the id was changing based on the data that shows up on screen. However, it was based on a particular logic.. so the id was being suffixed by an id in database etc.. so I wrote code to first figure out what that value would be depending on input data and then dynamically figure out the id. Maybe your situation is even more dynamic?

  • @nmkkannan1256
    @nmkkannan1256 7 ปีที่แล้ว

    How to locate Xpath by text if the text is 'I'm Feeling Lucky'

    • @Mukeshotwani
      @Mukeshotwani  7 ปีที่แล้ว

      +Inty Uyghur haha very nice 👍🏻 Inty

  • @tapaskhandai
    @tapaskhandai 4 ปีที่แล้ว +1

    Which browser u r using?

    • @Mukeshotwani
      @Mukeshotwani  4 ปีที่แล้ว +1

      it is Firefox earlier we have firebug and firepath where we used to write xpath.

    • @Mukeshotwani
      @Mukeshotwani  4 ปีที่แล้ว +1

      Hi Tapas here is the link for updated video th-cam.com/video/kjTsGnkPQEc/w-d-xo.html

    • @tapaskhandai
      @tapaskhandai 4 ปีที่แล้ว

      @@Mukeshotwani Thank you

  • @neelamchakraborty9062
    @neelamchakraborty9062 6 ปีที่แล้ว +1

    How to get xpath of watermark .

    • @Mukeshotwani
      @Mukeshotwani  6 ปีที่แล้ว

      Any example or demo site for this ?

    • @neelamchakraborty9062
      @neelamchakraborty9062 6 ปีที่แล้ว

      Don't know was asked in interview. How to get an xpath of a watermark. if you find something please share. I guess this is a transparent object such as company logo.

  • @julyuser1030
    @julyuser1030 4 ปีที่แล้ว +1

    Good