how to integrate the slimerjs file with the help of php

106 Views Asked by At

I have created a slimerjs file which is working fine when I hit the command.

   var page = require('webpage').create();
   var url='http://localhost/slimerjs';
   page.open(url, function (status) {
  document.getElementsByClassName("test")[0].setAttribute("value",                                                                                                                                                             "Username");
    document.getElementsByClassName("class")[0].value = "Password"
    slimer.exit();
    });

But i want to make the atrribute's value dynamic so that when i will test the website i donot have to make the changes again n again.

P.S. I am using ubuntu

0

There are 0 best solutions below