<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: rajput2219</title>
    <description>The latest articles on DEV Community by rajput2219 (@rajput2219).</description>
    <link>https://dev.to/rajput2219</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F355432%2F4453ff19-6410-4b26-b9a1-b3c32fbae581.png</url>
      <title>DEV Community: rajput2219</title>
      <link>https://dev.to/rajput2219</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rajput2219"/>
    <language>en</language>
    <item>
      <title>How to add URL in Botman button in web-driver</title>
      <dc:creator>rajput2219</dc:creator>
      <pubDate>Tue, 31 Mar 2020 12:17:12 +0000</pubDate>
      <link>https://dev.to/rajput2219/how-to-add-url-in-botman-button-in-web-driver-4la5</link>
      <guid>https://dev.to/rajput2219/how-to-add-url-in-botman-button-in-web-driver-4la5</guid>
      <description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I want to add a URL in Botman button during conversation.&lt;/p&gt;

&lt;p&gt;Where I want to when we click on the answer button it's should be redirect to a URL in a new tab.&lt;/p&gt;

&lt;p&gt;I use ButtonTemplate but it's work on facebook messenger but I want to use it with simple web-driver where it's shown on browser.&lt;/p&gt;

&lt;p&gt;Please help.&lt;/p&gt;

&lt;p&gt;Code is given below.&lt;/p&gt;

&lt;p&gt;&amp;lt;?php&lt;br&gt;
namespace App\Http\Conversations;&lt;br&gt;
use BotMan\BotMan\Messages\Incoming\Answer;&lt;br&gt;
use BotMan\BotMan\Messages\Outgoing\Question;&lt;br&gt;
use BotMan\BotMan\Messages\Outgoing\Actions\Button;&lt;br&gt;
use BotMan\BotMan\Messages\Conversations\Conversation;&lt;/p&gt;

&lt;p&gt;class SelectServiceConversation extends Conversation&lt;br&gt;
{&lt;br&gt;
    public function askService()&lt;br&gt;
    {&lt;br&gt;
$question = Question::create('What kind of Service you are looking for?')&lt;br&gt;
            -&amp;gt;callbackId('select_service')&lt;br&gt;
            -&amp;gt;addButtons([&lt;br&gt;
                Button::create('Mobile')-&amp;gt;value('Mobile'), // Here we want to add URL which should be redirect on new page after click&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;            Button::create('Charger')-&amp;gt;value('Mobile'),
            Button::create('Battery')-&amp;gt;value('Mobile'),
        ]);

    $this-&amp;gt;ask($question, function(Answer $answer) {
        if ($answer-&amp;gt;isInteractiveMessageReply()) {
            $this-&amp;gt;bot-&amp;gt;userStorage()-&amp;gt;save([
                'service' =&amp;gt; $answer-&amp;gt;getValue(),
            ]);
        }
    $this-&amp;gt;bot-&amp;gt;startConversation(new NextConversation()); // Trigger the next conversation
    });  

}

public function run()
{
    $this-&amp;gt;askService();
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

</description>
      <category>botman</category>
    </item>
  </channel>
</rss>
