Author Topic: Our Groceries - Auto login issue  (Read 2793 times)

0 Members and 1 Guest are viewing this topic.

Stealth

  • Jr. Member
  • **
  • Posts: 40
  • Karma: 1
    • View Profile
Our Groceries - Auto login issue
« on: February 05, 2015, 12:23:20 PM »

Just as an aside: I did happen to see that you're trying to use the Our Groceries commands. Those won't work until you've entered your Our Groceries login info where indicated in the "update payload XML master list" command -- your email address and password need to replace the RoboB.SetText placeholders [[your login email address]] etc. You should enter that data without any square brackets (assuming you have an OurGroceries account already set up).

Hi nime5ter,

Further to our discussions in another thread, I'm having issues with the auto login part for Our Groceries.

Currently I have to manually login via the browser first.  I have again reinserted my login details as you describe but its still not working for me in the version.  If I select the option to show the browser I can see data is getting dropped in both the password and the check box fields but nothing is going in the email field?

I have attached the log file FYI

[edit: log file deleted after download to protect user data --nime5ter]
« Last Edit: February 05, 2015, 12:33:48 PM by nime5ter »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Our Groceries - Auto login issue
« Reply #1 on: February 05, 2015, 12:35:17 PM »
Thanks, that's helpful.

Can you please also post the xml for the Our Groceries group you are using? (You can put xxx in the username and pwd field before uploading, to keep your personal info private, but please don't change anything else.)
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Our Groceries - Auto login issue
« Reply #2 on: February 05, 2015, 12:39:06 PM »
In case it's not clear: Be sure to post the actual xml from your own command tree, and not something from the forum.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Stealth

  • Jr. Member
  • **
  • Posts: 40
  • Karma: 1
    • View Profile
Re: Our Groceries - Auto login issue
« Reply #3 on: February 05, 2015, 12:41:29 PM »
Here you go ....

Log file

[edit: deleted attached command group to protect user data -- nime5ter]
« Last Edit: February 05, 2015, 01:02:04 PM by nime5ter »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Our Groceries - Auto login issue
« Reply #4 on: February 05, 2015, 01:00:09 PM »
Thanks, that confirms my suspicions.

Somehow one of the action lines in the ++open list (login) command got deleted in your version. That line is what tells RoboBrowser which field (element) to focus on. Without it, RoboB had no way to know where it should insert your email address.

Here is the complete group again with the one command fixed, so you can delete the entire group that is currently in your tree and paste in this xml instead. (You'll need to re-enter your email and pwd. I removed the email address as well.)

If you click on the "Select" above the code box, that will ensure you're fully selecting all the text in the code box, and then you can copy and paste it back to your command tree.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<commandGroup open="True" name="Our Groceries new items" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="955" name="++good version of open list" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>OurGroceries</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.SetWinSize</cmdType>
      <params>
        <param>800</param>
        <param>600</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Navigate</cmdType>
      <params>
        <param>http://www.ourgroceries.com/your-lists/list/USE_CORRECT_URL_FOR_YOUR_LIST</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Show</cmdType>
      <params />
      <cmdRepeat>0</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>1800</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Wait</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementByID</cmdType>
      <params>
        <param>emailAddress</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>TTS.Speak</cmdType>
          <params>
            <param>Logging into our groceries.</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>RoboB.SetText</cmdType>
          <params>
            <param>email@yourname.org</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>RoboB.ElementByID</cmdType>
          <params>
            <param>password</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>RoboB.SetText</cmdType>
          <params>
            <param>XXXX</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>RoboB.ElementByID</cmdType>
          <params>
            <param>staySignedIn</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>RoboB.Click</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>RoboB.ElementByID</cmdType>
          <params>
            <param>signInButton</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>RoboB.Click</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>VC.Pause</cmdType>
          <params>
            <param>100</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else />
    </if>
    <phrase>refresh</phrase>
    <phrase>robo browser, our groceries, grocery list</phrase>
    <event>VC.Loaded</event>
  </command>
  <command id="877" name="Add Item dictionary" enabled="true" alwaysOn="False" confirm="True" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>OurGroceries</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementByID</cmdType>
      <params>
        <param>importItemsList</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.SetText</cmdType>
      <params>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementParent</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Submit</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Wait</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>{1}, was added to your list</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Don't forget, Remember, I need, We need, We are all out of</phrase>
    <phrase>to</phrase>
    <phrase>buy</phrase>
    <phrase optional="true">some</phrase>
    <payloadDictation>payloadDictation: Regular</payloadDictation>
  </command>
  <command id="942" name="Are you sure?" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>Are you sure you want to add {1} to your grocery list?</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>Confirm.Add Item dictionary</event>
  </command>
  <command id="915" name="Show Groceries" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>OurGroceries</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Show</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Show Groceries</phrase>
  </command>
  <command id="949" name="update payload XML master list" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>Scanning.</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>OurGroceries</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementByID</cmdType>
      <params>
        <param>addItemButton</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Click</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Wait</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementByID</cmdType>
      <params>
        <param>addItemMasterList</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.GetHTML</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegEx</cmdType>
      <params>
        <param>masterItemLabel\"&gt;(.*?)&lt;</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>Found {#M} items</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.NewFile</cmdType>
      <params>
        <param>groceries</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.Clear</cmdType>
      <params>
        <param>groceries</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.AddPair</cmdType>
      <params>
        <param>groceries</param>
        <param />
        <param>{Match.{i}}</param>
        <param>True</param>
      </params>
      <cmdRepeat>{#M}</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementByXY</cmdType>
      <params>
        <param>615</param>
        <param>31</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Click</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>Created PayloadXML with {#M} items.</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>Created Payload XML with {#M} items</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.RestartQuick</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>scan new groceries</phrase>
  </command>
</commandGroup>


The above group is technically the same as what was already on the forum in Command Group Two here: http://voxcommando.com/forum/index.php?topic=843.msg13689#msg13689

In general, when commands don't seem to be working as they should, a good standard problem-solving step is to compare against the original code to see what might be different and go from there.
« Last Edit: March 15, 2015, 06:08:19 PM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Our Groceries - Auto login issue
« Reply #5 on: February 05, 2015, 01:03:38 PM »
The specific action that was missing in the command that you posted was the one just above the logic block.

Code: [Select]
RoboB.ElementByID --> emailAddress
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Stealth

  • Jr. Member
  • **
  • Posts: 40
  • Karma: 1
    • View Profile
Re: Our Groceries - Auto login issue
« Reply #6 on: February 05, 2015, 01:15:00 PM »
Great that fixed it...  Thanks for all your help today.

Steve