Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98822

Click a graph icon using selenium

$
0
0

I am unable to click a graph icon in a Angular8 project. In the link below you can see the inspect element and the graph button:

enter image description here

This is the error displayed by selenium:

Message: 
    OpenQA.Selenium.WebDriverTimeoutException : Timed out after 30000 ms
  Stack Trace: 
    RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
    RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
    RemoteWebDriver.ExecuteScriptCommand(String script, String commandName, Object[] args)
    RemoteWebDriver.ExecuteAsyncScript(String script, Object[] args)
    NgWebDriver.WaitForAngular() line 359
    AdminLoginSteps.ThenINavigateToTheDPage() line 47
    lambda_method(Closure , IContextManager )
    BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) line 69
    TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) line 411
    TestExecutionEngine.ExecuteStep(IContextManager contextManager, StepInstance stepInstance) line 316
    TestExecutionEngine.OnAfterLastStep() line 132
    TestRunner.CollectScenarioErrors() line 59
    AdminLoginFeature.ScenarioCleanup()
    AdminLoginFeature.Login_As_Admin_User() line 11

I have tried to use XPath, full XPath, CssSelector but the test will keep failing and not execute this test.

[Then(@"I press the graph icon next to r reference")]
public void ThenIPressTheGraphIconNextToRReference() 
{
    NgWebElement GraphIcon = ngDriver.FindElement(By.XPath("//*[@id='d-list']/table/tbody/tr[2]/td[9]/button"));
    GraphIcon.Click();
    ngDriver.WaitForAngular();
}

Expected results: it should execute the step which will the lead a graph to open.


Viewing all articles
Browse latest Browse all 98822

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>