We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b56b312 commit 88d1e59Copy full SHA for 88d1e59
examples/test_agent.py
@@ -0,0 +1,12 @@
1
+from seleniumbase import BaseCase
2
+
3
4
+class MyTestClass(BaseCase):
5
6
+ def test_user_agent(self):
7
+ self.open('http://whatsmyuseragent.org/')
8
+ user_agent = self.get_text(".user-agent p")
9
+ print("\n\nUser-Agent:\n%s\n" % user_agent)
10
+ print(self.get_text(".ip-address p"))
11
+ print("\nThe browser will close automatically in 7 seconds...")
12
+ self.sleep(7)
examples/user_agent_test.py
@@ -1,4 +1,3 @@
-import time
from seleniumbase import BaseCase
@@ -11,4 +10,4 @@ def test_user_agent(self):
print("Displaying User-Agent Info:")
print(self.get_text("#useragent"))
13
print("\nThe browser will close automatically in 7 seconds...")
14
- time.sleep(7)
0 commit comments