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

Trying to access an element in silverlight via c# selenium webdriver [duplicate]

$
0
0

So I'm trying to automate a website which is done in silverlight

This function is failing which should send text to an xpath

public static void EnterInputByXpath(string Input, string xpath)
{
    var wait = new WebDriverWait(Driver.Instance, TimeSpan.FromSeconds(10));
    try
    {
        Driver.Instance.FindElement(By.XPath(xpath)).SendKeys(Input);
    }
    catch (NoSuchElementException e)
    {
        Assert.Fail("Policy category : can't send keys  ");
        throw (e);
    }
}

So I implement this here using the xpath followed by a date I want to input:

AutomationFramework3e.MatterGroupEnquiry.EnterInputByXpath("/html/body/e3e-root/e3e-context-menu-container/e3e-context-menu/mat-menu", "01/10/2019"); 

Here is the xpath which I think is correct:

/html/body/e3e-root/e3e-context-menu-container

Here is also a screenshot of the html so you have a better idea:

And the error I get in Visual Studio:

Test Name: Test02_LocateMatterWithWipBalancesAndTakeNoteOfMatterNumber Test FullName: Elite3e._1_Smoke_Tests.Test02.Test02_LocateMatterWithWipBalancesAndTakeNoteOfMatterNumber Test Source: \userroot\userdata$\rixa\Documents\Visual Studio 2015\Projects\3e\C4\1 Smoke Tests\Test02_LocateMatterWithWipBalancesAndTakeNoteOfMatterNumber.cs : line 20 Test Outcome: Failed Test Duration: 0:00:26.3454116

Result StackTrace: at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) at OpenQA.Selenium.Remote.RemoteWebElement.Click() at Elite3e._1_Smoke_Tests.Test02.Test02_LocateMatterWithWipBalancesAndTakeNoteOfMatterNumber() in \userroot\userdata$\user\Documents\Visual Studio 2015\Projects\3e\C4\1 Smoke Tests\Test02_LocateMatterWithWipBalancesAndTakeNoteOfMatterNumber.cs:line 27 Result Message: Test method Elite3e._1_Smoke_Tests.Test02.Test02_LocateMatterWithWipBalancesAndTakeNoteOfMatterNumber threw exception: System.InvalidOperationException: element click intercepted: Element Billing is not clickable at point (119, 480). Other element would receive the click: ... (Session info: chrome=78.0.3904.70) (Driver info: chromedriver=78.0.3904.70 (edb9c9f3de0247fd912a77b7f6cae7447f6d3ad5-refs/branch-heads/3904@{#800}),platform=Windows NT 6.1.7601 SP1 x86) (64)


Viewing all articles
Browse latest Browse all 98792

Trending Articles



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