Jump to content
UBot Underground

Searching on page not working


Recommended Posts

Hi all,

 

Ive searched the forum but cant get a correct solution for my problem.

 

Here's the code:

 

 

define Already Added Checker {
   if($search page("Webinars")) {
       then {
           Log Out()
           wait(3)
           click($element offset(<login link>, 0), "Left Click", "No")
           wait(3)
       }
       else {
           Add Product()
       }
   }
}

 

 

 

 

What I want to do is search a page for the word "Webinars" without quotes and the W is uppercase.

 

If it finds the word Webinars on that page I want it to Log out, which works fine.

 

However I am finding that it is running the Log Out routine regardless of whether there's a "Webinars" on the page or not.

 

What am I doing wrong here?

 

Thanks in advance,

 

Kevin

Link to post
Share on other sites
Guest michelsmith

If you work with Sessions, then the search criteria could be stored in the session. You just need to make sure that the user also can easily reset the stored search criteria.

 

$this->paginate = array(

'conditions' => array('Model.name LIKE' => '%'.$storedInTheSession.'%'),

'order' => array('Model.name ASC'),

);

Link to post
Share on other sites

Hi michelsmith,

 

Ok not too sure what you mean by sessions - is it "log in" sessions?

 

I am looking for a word that appears on a page, sometimes it does, sometimes it doesnt. If it does, I want to "Log Out" - if it doesnt ) want it to do another function.

 

I though doing the page search was the right thing, and maybe it is, but its not working right for me.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...