java - Selenium WebElement Selection -
currently, doing selenium stuff. while doing so, got stuck in 1 of xpath, gmail account creation page birth- month selection option. have given xpath below looks in firepath in console.
.//span[@id='birthmonth']//div[2]//div//div however, in java code it's not working; instead, program getting hung.
jave code below above xpath. kindly suggest me right xpath. or please let me know if there wrong in code or xpath.
list<webelement> gelements = driver.findelements(by.xpath(".//span[@id='birthmonth']//div[2]//div//div"));
you trying click div has display:none property.see code below:
driver.findelement(by.xpath("//span[@id='birthmonth']/div[@title='birthday']")).click(); driver.findelement(by.xpath("//span[@id='birthmonth']/div[2]/div[1]/div")).click(); when first div inside span clicked div[2] , children displayed.
Comments
Post a Comment