Hope you will use above tips and do share your experience :) Have a nice day.
@FelipeBarbosaGoogle5 жыл бұрын
Very good tutorial. I was looking exactly for relative xPaths, and your video is excellent about this subject.
@roopashreegadam82657 жыл бұрын
Hi Mukesh, This way of writing xpath in chrome really helped me a lot. Many times your videos helped e to resolve many of my issues Thank you so much
@Mukeshotwani7 жыл бұрын
Hey Roopa, I am glad my videos helping you. Keep sharing this channel :) Let me know if you need any help on this.
@sunayanakalekar21627 жыл бұрын
hi mukesh ur videos are awesome n much in detail can u please post some more videos related to web services and other tools that a QA should know
@VK-mf8cp5 жыл бұрын
When i click Ctrl+F5 then not able to see " Find by String, selectors or xpath " on windows 10, Chrome(ver-79.0.39). Please help in this.
@hayaulislam5 жыл бұрын
i am using xpath , it is correct but still eclipse showing error that element not found. what can be the error?
@Mukeshotwani5 жыл бұрын
Can u share the script? Chance are it may be in frame or your xpath is matching with multiple elements
@hayaulislam5 жыл бұрын
@@Mukeshotwani package datepicker; import org.openqa.selenium.chrome.*; import org.openqa.selenium.*; import org.openqa.selenium.By; public class youtube_datepicker_tutorial { public static void main(String[] args) { // TODO Auto-generated method stub WebDriver driver = new ChromeDriver(); driver.get("www.phptravels.net/"); driver.findElement(By.xpath("//*[@id=\"dpd1\"]/div/input")).click(); } }
@hayaulislam5 жыл бұрын
Xpath is not working, in my project as well as i had tried with your example
@razorback69963 жыл бұрын
Best video on the subject! Thanks!!!!
@Mukeshotwani3 жыл бұрын
Glad it was helpful! Thanks Buddy
@shyamsundarghorai80546 жыл бұрын
Hi Mukesh, I am new in Selenium and want to learn from very beginning. After a bit more research in Goggle and KZbin, I found your channel. This is really awesome. Only one problem I am facing that the videos do not have any serial no. or they are not in series. Could you please guide me that from which video I should start and how I can move forward ? Thanks in advance.
@Mukeshotwani5 жыл бұрын
Sure Shyamsundar, I have noted your point and I will arrange them as per serial order.
@mahammedyaseen61133 жыл бұрын
can you please tell me is there anyway to write unique xpath without indexes?
@Mukeshotwani3 жыл бұрын
Hi Yaseen, if you add multiple attribute then xpath will be unique.
@yaseensyed55933 жыл бұрын
@@Mukeshotwani thank you so much for your reply Mukesh Bhai🤗
@LINGAREDDYSabbasani7 жыл бұрын
Thank you Mukesh!! for the tips to identifying xpath in chrome
@pushkarbajpai89897 жыл бұрын
Very nice info Mukesh!!.Thanks for sharing
@sameershaik25915 жыл бұрын
Hi Mukesh sir By using chropath extension in chrome browser we can generate xpath
@Mukeshotwani5 жыл бұрын
Yes Sameer it we can generate without extension as well
@Priyachauhan11117 жыл бұрын
Hi Mukesh sir, I have just started learning selenium from your videos, I am not able to post my query on your site.please help me with that. I am stuck with two words that is selenium driver and testNg, how this two differ from each other or are these interlinked.
@yellayiaruna61707 жыл бұрын
Hi Mukesh, Actually I have a doubt, Suppose that I am testing or running the script for Facebook, So when i would like to signup or register for the new account then to insert any text in the text box we need locate the element by ID/className and etc. So, could u tell me that the Id for any of the textbox gets changed frequently while inspecting?
@trivenireddy94785 жыл бұрын
Hi Mukesh, Hope you are doing good! , How to check xpath/css selectors using chrome/FF for the node.js type of applications? like I have been working web applications implemented using polymer components(i.e it has too many complex nested #shadow-root (open) tags ) To find one input box will be having mini 20 shadow-root in b/w from root main tag to inner child tag. Can you suggest Protractor with jasmine framework will support and report tools ?
@hayaulislam5 жыл бұрын
Can you refer any course for complete understanding of Selenium IDE, instead of Selenium Webdriver
@prikshitverma38854 жыл бұрын
I am having trouble in locating a live chat bot....So I inspect and I am not able to find any locator so that I can use that in scripting ..How I can sovlve this?
@Mukeshotwani4 жыл бұрын
Hey Prikshit here is the video kzbin.info/www/bejne/faacgYN6l62HfdE
@sadachougule79617 жыл бұрын
Hello, One of the interview that was asked to me last week was... Was there any Data Limitation in your application? For ex: I can only enter 20 characters in my text box... If so then how did you handle that... I couldnt answer this because I havn't come across such situation... Can I get an answer for this? This question was asked by Client in Client round at JP morgan
@towhidskynet7 жыл бұрын
do we have indexing for css selector also ?
@Mukeshotwani7 жыл бұрын
not sure
@krishnasamy39675 жыл бұрын
If you could have the windows little adjusted, so that the scrolling red line of youtube video will not disturb the viewer`s ability to understand the xpath coding you are doing in future. In this video, example at 2:35 the xpath code you`ve written is just coming on the youtube`s red scrolling line !!
@baldygaming22267 жыл бұрын
Hi Mukesh currently i cant use firebug firepath anymore with firefox, do you have other tools for firefox for finding xpath, because i like making my own xpath
@Mukeshotwani7 жыл бұрын
+Marven Policarpio yes 56 has some issue with firebug . Use 54 or previous version or lesser version. Hope it will get fixed in FF 57
@baldygaming22267 жыл бұрын
Mukesh otwani thanks mukesh still can use chrome though, but is there other way to search for an xpath in firefox like in chrome ctrl + f in the dev tools?
@sumitingle51312 жыл бұрын
Very useful Sir 🙏
@sudhirbchauhan4 жыл бұрын
Very helpful..Thanks Mukesh..!
@lovelymunjal65707 жыл бұрын
HI Mukesh Another easy way: inspect element and then right click on highlighted HTML code , click copy > select Xpath
@abhilashadeshpande79967 жыл бұрын
Thank you
@flatheadcatfish96 жыл бұрын
Thank you
@rickharbauer12195 жыл бұрын
Great Tutorial! :)
@Mukeshotwani5 жыл бұрын
Thanks Rick :)
@sachinbirajdarsa4 жыл бұрын
1 - inspect page 2 - select item you want (text field etc) 3 - hover mouse on inspection page and right click. There u can see copy xpath option.
@Mukeshotwani4 жыл бұрын
Thanks Sachin, but this xpath is not dynamic most of the time.
@sachinbirajdarsa4 жыл бұрын
@@Mukeshotwani should we practice it or not
@Mukeshotwani4 жыл бұрын
@@sachinbirajdarsa try writing your own xpath which will help you.
@mahmoudiwissem92403 жыл бұрын
@@Mukeshotwani can we consider Copying the xpath option efficient and useful most of the time or not ?
@gopikrishnagollaprolu61627 жыл бұрын
Hi Mukesh, This parenthesis Work for only chrome or Mozilla also.
@Mukeshotwani7 жыл бұрын
Yes it works for Firefox also
@luistrejo99146 жыл бұрын
I'm trying to do your exercise and I have some issues..... I have a button in a modal, but when I try to close it with this function driver.findElement(By.xpath("//button[@type='button']")).click(); I don't have the correct result, can you help me please? These are my options that I tried..... //driver.close(); //WebDriverWait wait = new WebDriverWait(driver, 3); driver.findElement(By.xpath("//button[@type='submit']")).click(); //driver.findElement(By.xpath("//*[@class='bootbox-close-button close']")).click(); //driver.findElement(By.className("//*[@class='bootbox-close-button']")).click(); //driver.findElement(By.xpath("/html/body/div[2]/div/div/div[1]/@type='button']")).click(); //driver.findElement(By.xpath("/html/body/div[2]/div/div/div[1]/button")).click(); //driver.switchTo().activeElement().sendKeys(Keys.ENTER); //driver.findElement(By.xpath("//button[starts-with(@type,'button')]")).click(); //driver.findElement(By.xpath("/html/body/div[2]/div/div/div[1]/button")).click(); //WebElement element = driver.findElement(By.xpath("//*[@test-type='button']")); //driver.findElement(By.xpath("//button[contains(@type,'button')]")).click(); //driver.elementToBeClickable(By.xpath("type=button"))).click(); //WebDriverWait wait = new WebDriverWait(driver, 5); //wait.until(ExpectedConditions.elementToBeClickable(By.xpath("button#button"))).click(); //Alert alert = new WebDriverWait(driver, 20).until(ExpectedConditions.alertIsPresent()); //alert.accept(); //WebDriverWait wait = new WebDriverWait(driver, 10); //Now wait until this dialog close button visible and clickable then click //wait.until(ExpectedConditions.elementToBeClickable(By.xpath("/html/body/div[2]/div/div/div[1]/button"))).click(); //WebElement xButton = driver.findElement(By.cssSelector(".bootbox-close-button close")); //JavascriptExecutor js = (JavascriptExecutor) driver; //js.executeScript("arguments[0].click()", xButton); //cancel_button = browser.div("@class= modal-footer").button(:class => "btn btn-danger"); //cancel_button.when_present.click(); // String winHandleBefore = // driver.getWindowHandle(); // driver.findElement(By.xpath("/html/body/div[2]/div/div/div[1]/button")).click(); // Xpath of register Button // Set handles = (Set) driver.getWindowHandles(); //WebDriverWait wait = new WebDriverWait(driver, 10); //Click on read more button to open this dialog //wait.until(ExpectedConditions.elementToBeClickable(By.partialLinkText("x"))).click(); //Now wait until this dialog close button visible and clickable then click //wait.until(ExpectedConditions.elementToBeClickable(By.cssSelector("button.bootbox-close-button close"))).click(); //driver.findElement(By.xpath("/html/body/div[2]/div/div/div[1]/button[contains(@class,'bootbox-close-button close')]")).click(); //driver.findElement(By.xpath("//div[@tabindex='-1']//button[@type='button']")).click(); //driver.findElement(By.className("@class= bootbox-close-button close")).click(); //driver.findElement(By.className("//div[@class= 'bootbox modal fade in']/div[@class= 'modal-dialog']/div[@class= 'modal-content']/div[@class= 'modal-header']/button[@class= 'bootbox-close-button close']")).click(); //driver.findElement(By.className("//button[@class= 'bootbox-close-button close']")).click(); //driver.findElement(By.className("//button[starts-with(@class,'bootbox-close-button close')]")).click(); /*if(driver.switchTo().alert() != null) { Alert alert = driver.switchTo().alert(); String alertText = alert.getText(); alert.dismiss(); // alert.accept(); }*/ //WebDriverWait wait = new WebDriverWait(driver, 20); //wait.until(ExpectedConditions.visibilityOfElementLocated(By.className("bootbox-close-button close"))).click(); //driver.findElement(By.cssSelector("body > div.bootbox.modal.fade.in > div > div > div.modal-header > button")).sendKeys(Keys.chord(Keys.ALT, Keys.F4)); //driver.findElement(By.cssSelector("body > div.bootbox.modal.fade.in > div > div > div.modal-header > button")).click(); //driver.findElement(By.className("bootbox-close-button close")).click(); //WebDriver driver=new FirefoxDriver(); //driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); //driver.findElement(By.className("bootbox-close-button close")).click(); // Alert alert = driver.switchTo().alert(); // System.out.println(alert.getText()); //try { // Thread.sleep(5000); // } catch (InterruptedException e) { // e.printStackTrace(); // } //alert.dismiss();
@akanshasaraswat72747 жыл бұрын
sir please i want to give a little project for selenium please make this project video and share on you tube its helpful for everyone in this we use webdriver and testng and maven etc
@Sarasu1.iihtvadapalani7 жыл бұрын
every thing is MAAS Mukesh Happy Diwali In Advance...
@Mukeshotwani7 жыл бұрын
Thanks Sharon
@akanshasaraswat72747 жыл бұрын
sir please share about "git hub" its reaaly very important . how to install and how to work on this, how to check repository all about this pls as soon as possible its urgent
@swapnapradhan70727 жыл бұрын
Did he share???
@swapnapradhan70727 жыл бұрын
if not could you please share with me.....plz
@madhurichebbi27697 жыл бұрын
Hello sir can you please tell me how to find xpath for tooltip text. I am unable to inspect the tooltip text. Please sir
@salmanmohamed19937 жыл бұрын
u can use tool tip text to identify it
@TheHarmonicaDad4 жыл бұрын
Well explained
@Mukeshotwani4 жыл бұрын
Thanks Ranga
@nehakatoch22616 жыл бұрын
thanks for ur help..
@Mukeshotwani6 жыл бұрын
Most welcome Neha.
@kumarshailendrasoni7 жыл бұрын
Thanks mukesh!
@jackjose26404 жыл бұрын
How to find for an element with class=
@Mukeshotwani4 жыл бұрын
Hi Jack, you can use className locator or xpath or css. Here is the links below Xpath kzbin.info/www/bejne/d6SaY6Bvptd0h5o CSS kzbin.info/www/bejne/fpPcZ5KNns6Xp68
@hemanginipatel4410 Жыл бұрын
It helped
@Mukeshotwani Жыл бұрын
Thank you Hemangini
@Sargam_Cafe5 жыл бұрын
it is great but here we are making x path and then searching it , I expected to get a xpath as tiltle says
@arunprasadchief5 жыл бұрын
inspect, find the element, select copy, then "copy the xpath"
@Mukeshotwani5 жыл бұрын
Yes Arun
@Mukeshotwani5 жыл бұрын
But it will not be unique xpath which might fail your script in next iteration.