getting this error while sending keys Invalid Element State Error - appium-android

I am trying to send keys to an edit text box but getting this error:
org.openqa.selenium.InvalidElementStateException: io.appium.uiautomator2.common.exceptions.InvalidElementStateException: Cannot set the element to '7343897689'. Did you interact with the correct element

Related

How to find out what i'm doing wrong. Getting validation exception in timestream write Records with go sdk?

As the title says, I'm trying to write a bunch of records to timestream, but I keep getting "ValidationException" without any further information, so I have no idea what should be fixed. The exact error response is:
operation error Timestream Write: WriteRecords, https response error StatusCode: 400, RequestID: XXXXXXXXXXXXXX, ValidationException:
It made me think that it was a multiline string and somehow the logging framework wasn't logging properly, but I tried splitting by \n and all I got was a size 1 list with the same text.
Any ideas?
For some reason, the validation error is wrapped multiple errors deep. To get to the validation error message, you need the following:
import (
"fmt"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/aws/transport/http"
"github.com/aws/aws-sdk-go-v2/service/timestreamwrite/types"
"github.com/aws/smithy-go"
)
responseError := err.(*smithy.OperationError).Unwrap().(*http.ResponseError)
validationError := responseError.Unwrap().(*types.ValidationException)
fmt.Println(validationError.ErrorMessage())

FIX response with this error: Value is incorrect (out of range) for this tag

When I send the order request on the FIX server as :
8=FIXT.1.1|9=179|35=D|34=34|49=135|52=20200206-04:52:04.406|56=PSE|1=11101401117577|11=1580964724079|38=1000|40=2|44=10.5|54=1|55=AGI|59=0|60=20200206-12:52:04.406|453=1|448=13501100|447=C|452=12|10=009|)
The response that I receive is:
8=FIXT.1.1|9=000362|35=8|49=PSE|56=135|34=34|57=13501100|52=20200206-04:52:04.533|37=NONE|11=1580964724079|453=4|448=13501999|447=C|452=11|448=13501999|447=C|452=36|448=13501100|447=C|452=12|448=135|447=C|452=1|17=1904|150=8|39=8|103=99|1=11101401117577|55=AGI|54=1|38=1000|44=10.5|59=0|528=F|151=0|14=0|60=20200206-04:52:04.356|58=(293): **Orders are not being accepted at this time|10=020|)**
With the PSE error as:
<20200206-04:52:04, FIXT.1.1:135->PSE, error> (Rejecting invalid message: quickfix.IncorrectTagValue: Value is incorrect (out of range) for this tag, field=528 field=528: 8=FIXT.1.1|9=362|35=8|34=34|49=PSE|52=20200206-04:52:04.533|56=135|57=13501100|1=11101401117577|11=1580964724079|14=0|17=1904|37=NONE|38=1000|39=8|44=10.5|54=1|55=AGI|58=(293): Orders are not being accepted at this time|59=0|60=20200206-04:52:04.356|103=99|150=8|151=0|528=F|453=4|448=13501999|447=C|452=11|448=13501999|447=C|452=36|448=13501100|447=C|452=12|448=135|447=C|452=1|10=132|)
<20200206-04:52:04, FIXT.1.1:135->PSE, error> **(Reject sent for Message 34: Value is incorrect (out of range) for this tag**, field=528:528)
According to the documentary the value for 1 should be 14 digit trading account(1=xxxxxxxxxxxxxx) but when I give that, then I had receive the above error.So what value should be given for 1 so the response should be receive.
So what is the solution for this error?
The flow is as follows:
you send a NewOrderSingle
they reply with an ExecutionReport that they don't accept orders at that time
you (and not PSE) reject that ExecutionReport because tag 528 on the ExecutionReport that PSE sent contains a value that is not contained in your data dictionary.
What you need to do is either of
Read PSE's rules of engagement (i.e. their FIX spec) and add all needed tags and values to your data dictionary.
Configure your session to not validate incoming messages (setting ValidateIncomingMessage=N) but this means you would need to do validation by yourself if required. E.g. if you wanted to retrieve values from tag 150/ExecType then you can be sure that only values which are allowed in the data dictionary reach your application. With disabled validation you would need to do these checks by yourself.
Alternatively you could set RejectInvalidMessage=N which also will not reject the message but only log the warning with the validation error.

Debugging Transformer Errors in Mirth Connect Server Log

Fairly new to Mirth, so looking for advice in regards to debugging/getting more information from errors reported in the Server Log in Mirth Connect. I know what channel this is originating from, but that's about it. This error is received 10 times for each message coming through. It should be noted that the channel is working properly except for this error cluttering up the logs.
The Error:
ERROR (transformer:?): TypeError: undefined is not an xml object.
What I've Tried:
Ruled out Channel Map variables (mappers), they don't have null default values, they match up with vars in the incoming xml message, even changed to Javascript transformers to modify the catch to try to narrow down the issue, but no luck.
Modified external javascript source files to include more error handling (wrapped each file in a try/catch that would log with identifying info) but this didn't change the result at all.
Added a new Alert to send info if errors are received, but this alert never fired.
Anything else to try? Thanks for any/all help!
This is a Rhino message that happens when you use an e4x operator on a variable that isn't an xml object. The following two samples will both throw the same error you are seeing when obj is undefined. Otherwise, 'undefined' in your error will be replaced with obj.toString();
// Putting a dot between the variable and () indicates an xml filter
// instead of a function call
obj.('test');
// Two consecutive dots returns all xml descendant elements of obj
// named test instead of retrieving a property named test from obj.
obj..test;

How do output for tRESTClient

I read some param from JSON file and for each param i should send request.
That when i true move output to any element i get errors:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
statusCode cannot be resolved or is not a field
string cannot be resolved or is not a field
body cannot be resolved or is not a field
The method getHeaders() is undefined for the type Response
at pricing.pricing_0_1.Pricing.tFileInputJSON_1Process(Pricing.java:3334)
at pricing.pricing_0_1.Pricing.tREST_1Process(Pricing.java:1783)
at pricing.pricing_0_1.Pricing.runJobInTOS(Pricing.java:4634)
at pricing.pricing_0_1.Pricing.main(Pricing.java:4366)
I had the same error messages (also having JSON files as input and output) and I found that the solution is to leave the Input, Response and Error Schema with the structures they initially had in tRESTClient.
The Input Schema contains body and string. Here you can either use tXMLMap to define the body structure (this didn't work for me) or send the JSON file as a string with tMap directly into the tRESTClient.
The Response has the schema statusCode, body and string. Again, just retrieving the string with a tMap and tLogRow will get you the output of tRestClient.
I hope this helps.
Include the statusCode variable in the JSON
I too got the same error, what I came across is since trestclient is expecting the schema inputs in form of stausCode , body and String.
Whereas the input is fed as key and value pair of schema. So we are getting error as enter image description here
So I used a tconvertType and converted the outgoing row from tconverttype as stausCode , body and String, and it started working.
enter image description here
and all the errors went away.
Thanks,

FIX server rejecting message saying there is a body length error?

I'm sending a new order message (message type 'D') to my FIX server and it's getting kicked back from 'pre-validation' on the server with the response that the stated message body length does not match the actual message.
In a text editor it appears that the declared body length DOES match the message length (measured between the bodylength tag value, and the delimiter preceding the checksum)
Below is the message I am sending (with sensitive data replaced with an equal number of 'x' characters):
8=FIX.4.4^9=183^35=D^34=2^49=xxxxxxxxxxx^52=20130927-19:57:35.771^56=xxx^1=xxxxxxxx^11=123^21=1^38=10^40=1^52=20130927-19:57:35.770^54=1^55=MSFT^59=1^60=20130927-19:57:35.771^100=xxxx^553=xxxxxxxxxx^10=234^
Here is the Business Reject Message (type 'j') that I immediately get back:
8=FIX.4.4^9=126^35=j^49=xxx^56=xxxxxxxxxxx^34=3^52=20130927-16:09:05.888^43=N^372=D^58=PreValidate Failed body lengh problem^380=4^379=2^45=0^10=007^
(the typo is theirs, not mine)
Here is the code used to build the message:
message = fix.Message()
header = message.getHeader()
header.setField(fix.BeginString('FIX.4.4'))
header.setField(fix.SenderCompID('xxxxxxxxxxx'))
header.setField(fix.TargetCompID('xxx'))
header.setField(fix.MsgType('D'))
message.setField(fix.Account(DEMO_Account_Number))
message.setField(fix.HandlInst('1')) #only valid value is '1'
message.setField(fix.OrderQty(int(Test_Order_Qty)))
message.setField(fix.OrdType('1')) #1=Market, 2=Limit, 3=Stop,4=StopLimit, P=TrailingStop, T=TTO
message.setField(fix.SendingTime(1))
message.setField(fix.Side('1')) #1=Buy, 2=Sell, 5=Sell Short, and 6=Sell Short Exempt.
message.setField(fix.Symbol('MSFT'))
message.setField(fix.TimeInForce('1')) # 0 = Day , 1 = GTC.................
message.setField(fix.TransactTime(1))
message.setField(fix.ExDestination('xxxx'))
message.setField(fix.Username(UserName))
fix.Session_sendToTarget(message)
What might be going wrong here? Why is the server kicking it back?
Thanks.