MicrosoftEdge - WebDriver - error when I try to use SelectElement - webdriver

I'm getting "unknown error" when I tried to set a Support.UI.SelectElement using the MicrosoftEdge driver. This is working fine for IE, Chrome and Firefox.
I'm using Selenium C# 2.47.
Example code:
dim e As OpenQA.Selenium.IWebElement
e = driver.FindElement(By.Id(id))
dim combo As OpenQA.Selenium.Support.UI.SelectElement
combo = New OpenQA.Selenium.Support.UI.SelectElement(e)
Error message: unknown error
StackTrace: at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response
errorResponse) at
OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String
driverCommandToExecute, Dictionary'2 parameters) at
OpenQA.Selenium.Remote.RemoteWebDriver.InternalExecute(String
driverCommandToExecute, Dictionary'2 parameters) at
OpenQA.Selenium.Remote.RemoteWebElement.Execute(String
commandToExecute, Dictionary'2 parameters) at
OpenQA.Selenium.Remote.RemoteWebElement.GetAttribute(String
attributeName) at
OpenQA.Selenium.Support.UI.SelectElement..ctor(IWebElement element)
Anyone has a workaround for it?
Thanks,
Cristian

Related

Error on using getLong() in BIRT report

This report has been running fine and all of a sudden is giving the below error message
A BIRT exception occurred. See next exception for more information.
TypeError: Cannot find function getLong in object com.ibm.tivoli.maximo.report.script.MXReportDataSetImpl#4188e92b. (/report/data- sets/script-data-set[#id="1990"]/method[#name="fetch"]#29).
at org.eclipse.birt.report.engine.script.internal.DtEScriptExecutor.handleJS (DtEScriptExecutor.java:99)
at org.eclipse.birt.report.engine.script.internal.DataSetScriptExecutor.handleJS(DataSetScriptExecutor.java:256)
at org.eclipse.birt.report.engine.script.internal.ScriptDataSetScriptExecutor.handleFetch(ScriptDataSetScriptExecutor.java:143)
at org.eclipse.birt.data.engine.impl.ScriptDataSetRuntime.fetch(ScriptDataSetRuntime.java:103)
at org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor$CustomDataSet.fetch(PreparedScriptDSQuery.java:260)
at org.eclipse.birt.data.engine.executor.cache.OdiAdapter.fetch(OdiAdapter.java:226)
at org.eclipse.birt.data.engine.executor.cache.RowResultSet.fetch(RowResultSet.java:145)
at org.eclipse.birt.data.engine.executor.cache.RowResultSet.doNext(RowResultSet.java:118)
at org.eclipse.birt.data.engine.executor.cache.RowResultSet.next(RowResultSet.java:96)
at org.eclipse.birt.data.engine.executor.cache.ExpandableRowResultSet.next(ExpandableRowResultSet.java:63)
at org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.populateData(SmartCacheHelper.java:318)
Below is the code which has been written in FETCH method that's causing the error. If I change getLong to getString then it works without any issue. However I would like to understand what could cause the issue since it was working fine before without any issue.
commLogDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), "commLogDataSet");
commLogDataSet.open();
commLogSQL = "select commlog.message, commlog.ownerid
from commlog where commlog.commlogid = " + workLogDataSet.getDouble("worklogid")
;
commLogDataSet.setQuery(commLogSQL);
if(commLogDataSet.fetch()) {
row["recordkey"] = commLogDataSet.**getLong**("ownerid");
row["description"] = commLogDataSet.getString("message");
}
commLogDataSet.close();
}

xpath query not working in BizTalk orchestration

I'm trying to rewrite a BizTalk 2010 application and do away with an external assembly, but I seem to be running into xpath problems.
We have a process that stores a healthcare claim (837P) as xml in the database, and we need to extract it later. I have a WCF port calling a stored procedure that returns an xml message that looks something like this:
<ClaimXml_SEL_GetClaimXmlResponse xmlns="http://schemas.microsoft.com/Sql/2008/05/TypedProcedures/dbo">
<StoredProcedureResultSet0>
<StoredProcedureResultSet0 xmlns="http://schemas.microsoft.com/Sql/2008/05/ProceduresResultSets/dbo/ClaimXml_SEL_GetClaimXml">
<Claim><![CDATA[<ns0:X12_00401_837_P (etc.)
So what I need to do is extract the actual 837P message - the part that starts with ns0:X12_00401_837_P.
The helper class is very simple, just has a method like this:
public XmlDocument ExtractClaimXml(XmlDocument xDoc)
{
XmlDocument xReturn = new XmlDocument();
XmlNode node = xDoc.SelectSingleNode("/*[local-name()='ClaimXml_SEL_GetClaimXmlResponse' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/TypedProcedures/dbo']/*[local-name()='StoredProcedureResultSet0' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/TypedProcedures/dbo']/*[local-name()='StoredProcedureResultSet0' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/ProceduresResultSets/dbo/ClaimXml_SEL_GetClaimXml']/*[local-name()='Claim' and namespace-uri()='http://schemas.microsoft.com/Sql/2008/05/ProceduresResultSets/dbo/ClaimXml_SEL_GetClaimXml']");
xReturn.LoadXml(node.InnerText);
return xReturn;
}
and then the Message Assignment shape has this code:
rawClaimXml = ClaimXmlResponse;
strippedClaim = XmlHelperClass.ExtractClaimXml(rawClaimXml);
Claim837P = strippedClaim;
...where ClaimXmlResponse; is the message shown above, Claim837P is an 837P message, and rawClaimXml & strippedClaim are xml variables. This works just fine, but it seems excessive to call an external assembly.
I tried this in the assingment shape:
rawClaimXml = xpath(ClaimXmlResponse, "same xpath as above");
strippedClaim.LoadXml(rawClaimXml.InnerText);
Claim837P = strippedClaim;
...but get the error "'UnderlyingXmlDocument.InnerText': .NET property is write-only because it does not have a get accessor".
So then I tried just getting a string from the xpath query:
rawClaimString = xpath(ClaimXmlResponse, "string(same xpath as above)");
rawClaimString = rawClaimString.Replace("<![CDATA[", "");
rawClaimString = rawClaimString.Replace(">]]>",">");
strippedClaim.LoadXml(rawClaimString);
Claim837P = strippedClaim;
...but that's no good. Also tried a variant:
rawClaimXml = xpath(ClaimXmlResponse, "same xpath as above");
rawClaimString = rawClaimXml.InnerXml.ToString();
rawClaimString = rawClaimString.Replace("<![CDATA[", "");
rawClaimString = rawClaimString.Replace(">]]>",">");
strippedClaim.LoadXml(rawClaimString);
Claim837P = strippedClaim;
...but still no good. Any suggestions?
Thanks!
1-
Here's a couple of things you can try:
Wrap the xpath in the string() function. xpath(ClaimXmlResponse,
"string(same xpath as above)");
Append the /text() node to the xpath. xpath(ClaimXmlResponse, "same
xpath as above/text()");
A combination of the two.
Can you elaborate on the goal here? There's nothing wrong with using the helper class. If it's the extra Assembly that's bothering you, you can always add the .cs to the BizTalk Project.
2-
Coming from a different direction, you can use Path option for the Inbound BizTalk message body on the Messages Tab of the WCF-Custom Adpater configuration.
I was also facing the similar issue but when I gone through your various solution I got the solution for my question.
For me this worked **
rawClaimString = xpath(ClaimXmlResponse, "string(same xpath as
above)");
**
thanks for that phew ;)
Coming to the solution for your problem you can distinguishly promote the node that holding your response and try to access that node using .notation and assign it to the sting this ll return the expected output to you :)

InvalidCastException on UltraWebGrid Infragistics asp.net

I am getting an
InvalidCastException was unhandled by user:
Conversion from String "ORDERDATE" to type "Integer" is not valid.
The error hits when it gets to the lines with band.SortedColumns.
Any idea why i get this error?
I have the same code for infragistics UltraWinGrid vb.net and I don't get that error.
UltraWebGrid1.DataSource = Nothing
myDataName = Generic.getPrevOrder(dt, username)
UltraWebGrid1.DataSource = dt
Dim band As Infragistics.WebUI.UltraWebGrid.UltraGridBand = UltraWebGrid1.DisplayLayout.Bands(0)
UltraWebGrid1.DisplayLayout.ViewType = Infragistics.WebUI.UltraWebGrid.ViewType.OutlookGroupBy
band.SortedColumns.Add(band.Columns("ORDERDATE"), True)
band.SortedColumns.Add(band.Columns("ORDERID"), False)
This could be nothing, but out of curiosity, what happens if you swap these around:
band.SortedColumns.Add(band.Columns("ORDERDATE"), True)
band.SortedColumns.Add(band.Columns("ORDERID"), False)
to
band.SortedColumns.Add(band.Columns("ORDERID"), False)
band.SortedColumns.Add(band.Columns("ORDERDATE"), True)
It could be that the schema of the layout (UltraWebGrid1.DisplayLayout.Bands(0)) is different to what is expected? I can't see why it should make a difference, but it's worth ruling it out.

asp ERROR MESSAGE

How I can solve this error message
Microsoft VBScript runtime error
'800a01a8' Object required: 'lUATRef'
/cmgtest/transaction/viewPCReqForm.asp,
line 284
this is some source code that I wrote below
function checkUATReq(aUATRef)
Dim correctness,lUATRef,uatRef
correctness = False
lUATRef = aUATRef
uatRef = lUATRef.Substring(1,2)
rwriteln uatRef
'sqlCheckUATReq = "select * from PC_DETAIL where ID ='"&uatReqRef&"'"
'rwriteln uatReqRef
End function
Seems like your function isn't getting a parameter passed to it. Check whether aUATRef is getting initialized.
In VBScript, Strings aren't objects. You should use the Mid function to get a portion of a string:
uatRef = Mid(IUATRef, 1, 2)

Problems with If Statement (ASP.NET)

Dim custEmail As String
Dim inputEmail As String
custEmail = dt.Rows(0).Item("email")
inputEmail = email_add.Text
if (custEmail.toString() == inputEmail.toString() ){
label1.Text = custEmail
}
End If
This code is giving an error: Compiler Error Message: BC30201: Expression expected.
I just basically want to check if two values are equal but its saying something about expression expected although i've given the expression to evaluate.
The above is a mix of vb.net and c# syntax. You can use either in .net with success but not both at the same time. Get rid of the { and } to stick with vb.
Looks like you are mixing C# and VB.Net. Assuming you are using VB.Net
Replace the '{' with Begin IF and remove the '}'.

Resources