0

There is a sign in button but im not able to find its name on the source page. The url of the web page is http://pict.ethdigitalcampus.com/PICT/

Which method of splinter could i use here?

        <td width="214" colspan ="2"><div align="left">
        <input type="submit" value="Sign In" onclick="return validate();" style="font-family: Verdana; font-size: 8pt; border: 1px solid #666666; padding-left: 2; padding-right: 2; padding-top: 1; padding-bottom: 1">
           <input type="reset" name="reset" value="Reset" style="font-family: Verdana; font-size: 8pt; border: 1px solid #666666; padding-left: 2; padding-right: 2; padding-top: 1; padding-bottom: 1">
          <br>
The_Coder
  • 321
  • 5
  • 18

2 Answers2

2

If name is not available, known id, class also not provided. so you can try with cssselector or xpath

cssSelector=input[value='Sign In']
xpath=//input[@value='Sign In']

Thank You, Murali

murali selenium
  • 3,847
  • 2
  • 11
  • 20
2

To expand on Murali's answer, xpaths are useful in this scenario.

import splinter

browser = splinter.Browser()
browser.visit("http://pict.ethdigitalcampus.com/PICT/")

button = browser.find_by_xpath("//input[@value='Sign In']")

The "//" at the beginning of the xpath allows you to find input elements in any part of the document, to keep the query generic.

Harald Nordgren
  • 11,693
  • 6
  • 41
  • 65