cancel
Showing results for 
Search instead for 
Did you mean: 

Script stops at empty textfield

Former Member
0 Kudos

Hello Personas experts,

ive some trouble with check if textfield is empty i do ist with

if (session.findById("wnd[0]/usr/txtPersonas_1453279026246").text == "")

but when the textfield is empty every script stops working and i dont have the possibility to catch this issue is there any solution for this problem ?

Thank you for Helping

kind regards

Florian

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Update to the last version has fixed the problem

Answers (1)

Answers (1)

Former Member
0 Kudos

What do you mean by "stops working"? That's pretty hard to help with...

I can't immediately see anything wrong with your code, but I would write that test like this:

if (!session.findById("wnd[0]/usr/txtPersonas_1453279026246").text) 


I use this construct through all of my scripts and it works perfectly.


Steve.


Former Member
0 Kudos

Since we have installed Personas 3 SP2 i geht this errormessage when execute my code:

Error during script execution:

TypeError: Cannot read property 'Text' of undefined

    at Object.oPrivate.getPropertyValue

and it happens only when i check a textfield if its empty.

In Personas 3 SP1 this works well.

Florian

Former Member
0 Kudos

If this worked in SP01 and fails in SP02 then I'd raise an OSS incident about it. That shouldn't have happened. Applying SP02 didn't break any of my scripts.

Steve.

Former Member
0 Kudos

Just a thought. After installing SP02 did you flush the MIME cache in the Personas admin transaction? Also try flushing the flavour cache and your browser cache. This sort of feels like you might have some of SP01 cached somewhere and there's an internal incompatibility. Worth a try.

This might be the cause of your other problem, with executeScript, also.

Steve.

Former Member
0 Kudos

Ive cleaned now the MIME Cache, the Flavors Cache and my Browser Cache and both scripts do still not working.


But while testing i found out that the issue with empty textfields only appears when the developertools from chrome isnt open. When it is open and i call the debugger everthing works fine.


Florian

Former Member
0 Kudos

That's very odd. Are you able to try different browsers and see what behaviour you get? I suspect you are going to need to open an OSS incident about this, but the more information you collect before you do, the more quickly you are likely to get a solution.

Steve.