Closed Bug 1309336 Opened 8 years ago Closed 8 years ago

Unable to select and element from dropdown in UI in mozilla firefox 49.0.1

Categories

(Firefox :: Untriaged, defect, P1)

49 Branch
x86_64
Windows 7
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: kritesh951989, Unassigned)

Details

(Keywords: pi-marionette-big, Whiteboard: [specification][type:bug])

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0
Build ID: 20160922113459

Steps to reproduce:

I was trying to select an element from dropdown in testrail using Select.

I have written the code in java using os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_101'


Command used	//new Select(driver.findElement(By.xpath("//div[13]/div[2]/div/table/tbody/tr/td/select[@class='form-control form-control-full form-select']"))).selectByVisibleText("Contains");

Previously same code was working till 46.0 (before I start using marionette driver).
Code line used in code to open browsers: System.setProperty("webdriver.gecko.driver", "C:\\Users\\kuritesh\\Downloads\\moziotte\\wires.exe");
       
      WebDriver driver = new FirefoxDriver();



Actual results:

Error seen in console as :

Oct 11, 2016 11:55:26 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end
1476210332947	Marionette	INFO	Listening on port 63811
1476210337296	Marionette	INFO	startBrowser c6237c69-b4f9-4592-9aaf-07a50c9658b6
Oct 11, 2016 11:55:38 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
JavaScript warning: https://testrail.labcollab.net/testrail/js/extensions-combined.js?3452, line 33: unreachable code after return statement
JavaScript warning: https://testrail.labcollab.net/testrail/js/extensions-combined.js?3452, line 33: unreachable code after return statement
JavaScript warning: https://testrail.labcollab.net/testrail/js/extensions-combined.js?3452, line 33: unreachable code after return statement
JavaScript warning: https://testrail.labcollab.net/testrail/js/extensions-combined.js?3452, line 33: unreachable code after return statement
JavaScript warning: https://testrail.labcollab.net/testrail/js/extensions-combined.js?3452, line 33: unreachable code after return statement
JavaScript warning: https://testrail.labcollab.net/testrail/js/extensions-combined.js?3452, line 33: unreachable code after return statement
JavaScript warning: https://testrail.labcollab.net/testrail/js/extensions-combined.js?3452, line 33: unreachable code after return statement
JavaScript warning: https://testrail.labcollab.net/testrail/js/extensions-combined.js?3452, line 33: unreachable code after return statement
Exception in thread "Thread-0" org.openqa.selenium.TimeoutException: Expected condition failed: waiting for visibility of element located by By.xpath: //div[13]/div[2]/div/table/tbody/tr/td/select[@class='form-control form-control-full form-select'] (tried for 30 second(s) with 500 MILLISECONDS interval)
Build info: version: 'unknown', revision: '3169782', time: '2016-09-29 10:24:50 -0700'
System info: host: 'MAA-CKCX5Z1', ip: '10.85.202.202', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_101'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{rotatable=false, raisesAccessibilityExceptions=false, marionette=true, appBuildId=20160922113459, version=, platform=XP, proxy={}, command_id=1, specificationLevel=0, acceptSslCerts=false, processId=23088, browserVersion=49.0.1, platformVersion=6.1, XULappId={ec8030f7-c20a-464f-9b0e-13a3a9e97384}, browserName=firefox, takesScreenshot=true, takesElementScreenshot=true, platformName=windows_nt, device=desktop}]
Session ID: c6237c69-b4f9-4592-9aaf-07a50c9658b6
	at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:80)
	at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:265)
	at TestCycles.NonAutomatedCases.BiscuitBatUser(NonAutomatedCases.java:5104)
	at TestCycles.NonAutomatedCases$41.run(NonAutomatedCases.java:671)



Expected results:

Element in dropdown should be selected
Severity: normal → critical
OS: Unspecified → Windows 7
Hardware: Unspecified → x86_64
Whiteboard: [specification][type:bug]
Severity: critical → blocker
Priority: -- → P1
public static void FoxP0P1User() throws InterruptedException
	{
		System.setProperty("webdriver.gecko.driver", "C:\\Users\\kuritesh\\Downloads\\moziotte\\wires.exe");
		WebDriver driver = new FirefoxDriver();
	    driver.get("testrail URL");
		driver.findElement(By.id("name")).sendKeys("cas");
		driver.findElement(By.id("password")).sendKeys("");
		driver.findElement(By.xpath("//*[@id='content']/form/div[5]/button")).click();
		driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);
		driver.findElement(By.xpath("//a[text()='Test Runs & Results']")).click();
		driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);
		driver.findElement(By.xpath("//span[text()='Add Test Plan']")).click();
		driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);
		driver.findElement(By.id("name")).sendKeys("Pcs "+ cvd+"dd");
		new Select(driver.findElement(By.id("milestone_id"))).selectByVisibleText(MilestoneName);
		driver.findElement(By.xpath("//span[text()='Add Test Suite']")).click();
		Thread.sleep(1000);
		new Select(driver.findElement(By.id("choose_suite_id"))).selectByVisibleText("cvs");
		driver.findElement(By.id("chooseSuiteDialogSubmit")).submit();
		Thread.sleep(2000);
		
		driver.findElement(By.xpath("//div[1]/div/div/div[2]/div[2]/span[1]/a")).click();
		Thread.sleep(5000);
		
		driver.findElement(By.xpath("//a[text()='Label']")).click();
		Thread.sleep(2500);
		//Select sel1 = new Select(By.xpath(xpathExpression))
		new Select(driver.findElement(By.xpath("//div[13]/div[2]/div/table/tbody/tr/td/select[@class='form-control form-control-full form-select']"))).selectByVisibleText("Contains");
		Thread.sleep(2500);
		driver.findElement(By.xpath("//div[13]/div[2]/div/table/tbody/tr/td/input")).sendKeys("USER");
		Thread.sleep(2500);
		
		
		
		driver.findElement(By.xpath(".//*[@id='selectCasesSubmit']")).click();
public static void PancakeP0P1UserDebug() throws InterruptedException
	{
		System.setProperty("webdriver.gecko.driver", "C:\\Users\\kuritesh\\Downloads\\moziotte\\wires.exe");
		WebDriver driver = new FirefoxDriver();
	    driver.get("dsucsu");
		driver.findElement(By.id("name")).sendKeys("cscsx");
		driver.findElement(By.id("password")).sendKeys("css");
		driver.findElement(By.xpath("//*[@id='content']/form/div[5]/button")).click();
		driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);
		driver.findElement(By.xpath("//a[text()='Test Runs & Results']")).click();
		driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);
		driver.findElement(By.xpath("//span[text()='Add Test Plan']")).click();
		driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);
		driver.findElement(By.id("name")).sendKeys("hisadao);
		new Select(driver.findElement(By.id("milestone_id"))).selectByVisibleText(MilestoneName);
		driver.findElement(By.xpath("//span[text()='Add Test Suite']")).click();
		Thread.sleep(1000);
		new Select(driver.findElement(By.id("choose_suite_id"))).selectByVisibleText("cas);
		driver.findElement(By.id("chooseSuiteDialogSubmit")).submit();
		Thread.sleep(2000);
		
		
		
		new Select(driver.findElement(By.xpath(".//*[@id='filter-cases:custom_da_ready']/div[2]/select"))).selectByVisibleText("Yes");
		//device affected
		driver.findElement(By.xpath("//a[text()='Device Affected']")).click();
		
		Thread.sleep(2500);
		driver.findElement(By.id("filter-cases:custom_device_affected_mode_or")).click();
		Select sel = new Select(driver.findElement(By.xpath("//select[@class='form-control items']")));
		sel.selectByVisibleText("kk");
		sel.selectByVisibleText("kkk");
		sel.selectByVisibleText("mkkk");
		driver.findElement(By.xpath("//a[text()='Label']")).click();
		Thread.sleep(2500);
		//Select sel1 = new Select(By.xpath(xpathExpression))
		new Select(driver.findElement(By.xpath("//div[13]/div[2]/div/table/tbody/tr/td/select[@class='form-control form-control-full form-select']"))).selectByVisibleText("Doesn't Contain");
		Thread.sleep(2500);
		driver.findElement(By.xpath("//div[13]/div[2]/div/table/tbody/tr/td/input")).sendKeys("jjsak");
		Thread.sleep(2500);
		
		
		
		driver.findElement(By.id("selectCasesFilterApply")).click();
		Thread.sleep(3000);
		driver.findElement(By.xpath(".//*[@id='selectCasesSubmit']")).click();
		Integer NoOfTestRun=driver.findElements(By.xpath("//div/div/div/div[2]/div[2]/span[1]/a")).size();
		Thread.sleep(3000);
		
		
		
		driver.findElement(By.xpath("//button[@id='accept']")).click();
		driver.close();
	}
Seeing the conversation on #selenium on freenode it looks like the issue is in the locator strategies used
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.