I need a little help with my user code

Experiences, small talk, and other automation gossip.
Posts: 1
Joined: Mon Sep 20, 2021 1:41 pm

I need a little help with my user code

Post by kilmey » Mon Sep 20, 2021 1:51 pm

Hi folks, I need a little help, I think I did something wrong, because I can't understand this error code, there is a "; expected" in the middle of my user code.
f091e9dc-a974-4cf3-bbfb-1b3231d696c2(1).PNG (25.56 KiB) Viewed 332 times
f091e9dc-a974-4cf3-bbfb-1b3231d696c2.PNG (8.37 KiB) Viewed 332 times

User avatar
Ranorex Guru
Ranorex Guru
Posts: 7072
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: I need a little help with my user code

Post by odklizec » Mon Sep 20, 2021 2:24 pm


In my opinion, you are mixing a VB.Net and C# code ;) The code should look like this:

Code: Select all

IO.StreamWriter file= new IO.StreamWriter("c:\path\to\file.txt",  True);
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration