Hi I am new to selenium via VBA, so I am trying to automate a process by loging into a webpage navigate and get data extracted into the excel file. the problem is after login i am unable to input values in a search box.
Here are the codes i have tried
bot.FindElementById("placeholder-3vgh2").SendKeys "AAA"
bot.FindElementByClass(".public-DraftStyleDefault-block.public-DraftStyleDefault-ltr").SendKeys "AAA"
bot.FindElementByClass("public-DraftStyleDefault-block public-DraftStyleDefault-ltr").SendKeys "AAA"
bot.FindElementByXPath("//*[#data-contents='true']").SendKeys "AAA"
bot.FindElementByXPath("//*[#class='public-DraftStyleDefault-block public-DraftStyleDefault-ltr']").SendKeys "AAA"
bot.FindElementByXPath("//*[#data-offset-key='dtaef-0-0'][2]").SendKeys "AAA"
Here is HTML Code
<div class="db-World-topContent Box-root Box-background--surface Padding-vertical--20">
<div class="Box-root Flex-flex Flex-alignItems--center Flex-justifyContent--spaceBetween">
<div class="db-SearchField db-SearchField--tokenizable">
<div class="db-SearchField-input db-SearchField-input--highlighted">
<div class="DraftEditor-root">
<div class="DraftEditor-editorContainer">
<div aria-describedby="placeholder-3vgh2" class="notranslate public-DraftEditor-content" contenteditable="true" role="textbox" spellcheck="false" style="outline: none; user-select: text; white-space: pre-wrap; word-wrap: break-word;">
<div data-contents="true">
<div class="" data-block="true" data-editor="3vgh2" data-offset-key="dtaef-0-0">
<div data-offset-key="dtaef-0-0" class="public-DraftStyleDefault-block public-DraftStyleDefault-ltr"><span class="db-SearchField-token" data-offset-key="dtaef-0-0"><span data-offset-key="dtaef-0-0"><span data-text="true">is:</span></span>
</span>
</div>
</div>
</div>
</div>
</div>
</div><span></span><span></span></div><span></span></div>
<div class="Box-root">
<div class="Box-root Flex-flex Flex-alignItems--center Flex-direction--row Flex-justifyContent--flexStart" style="margin-left: -12px;">
<div class="Box-root Box-hideIfEmpty Margin-left--12"></div>
<div class="Box-root Box-hideIfEmpty Margin-left--12">
<div class="Box-root Padding-right--8">
<div class="db-FeedbackInput-container Card-root Card-shadow--small">
<div class="db-FeedbackInput-box Box-root Box-background--offset Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center">
<div class="Box-root Margin-right--8 Flex-flex"><span class="db-FeedbackInput-defaultIcon"></span></div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--gray400 Text-fontSize--14 Text-fontWeight--regular Text-lineHeight--20 Text-typeface--base Text-wrap--wrap Text-display--inline"><span>Feedback about this page?</span></span>
</div>
</div>
</div>
</div>
</div>
<div class="Box-root Box-hideIfEmpty Margin-left--12">
<div>
<div class="Box-root Flex-flex">
<div class="Box-root Flex-flex"><button aria-label="Documentation" class="db-DocumentationMenu-root" tabindex="-1"></button></div>
</div>
</div>
</div>
<div class="Box-root Box-hideIfEmpty Margin-left--12">
<div>
<div class="Box-root Flex-flex">
<div class="Box-root Flex-flex">
<div tabindex="-1" style="outline: none;"><button aria-label="Notifications" class="db-Notifications-button"><span class="db-Notifications-icon db-Notifications-icon--empty"></span></button></div>
</div>
</div>
</div>
</div>
<div class="Box-root Box-hideIfEmpty Margin-left--12">
<div>
<div class="Box-root Flex-flex">
<div class="Box-root Flex-flex"><button class="bs-Button bs-DeprecatedButton db-UserMenu" aria-label="User menu" type="button" tabindex="-1"><div class="db-GravatarImage db-UserMenu-image db-GravatarImage--none"></div></button></div>
</div>
</div>
</div>
</div>
</div>
</div><span class="db-World-topContent--left"></span><span class="db-World-topContent--right"></span></div>
Here is the outerHTML of iframe:
<iframe src="https://js.stripe.com/v2/m/outer.html#ping=false" style="width: 1px !important; height: 1px !important; position: absolute !important; left: -10000px !important; top: -1000px !important;"></iframe>
Try, following our debug session:
bot.FindElementByCss(".notranslate.public-DraftEditor-content").SendKeys "AAA"
Related
I have this shape and want to approximate the distance between each column, meaning I want to approximate the distance between each blue piece, how can I do that_?
Card.vue:
<template>
<div>
<div class="card d-inline-flex" style="width: 40rem; height:7rem; ">
<div class="row background">
<div class="col">
<div class="p-5 bg-info rounded-left ">Flex item 1</div>
</div>
<div class="col">
<div class="p-5 bg-info rounded-0 ">Flex item 1</div>
</div>
<div class="col">
<div class="p-5 bg-info rounded-right">Flex item 1</div>
</div>
</div>
</div>
</div>
</template>
<script></script>
<style>
.background {
background-color: #dcdcdc;
}
.d {
margin-left: 4px;
}
</style>
The space is there because bootstrap has a padding-left and padding-right of 15px for the class col pre-defined. So to get the space that you want, just add a custom class to your div and mess around with padding-left and padding-right. But don't forget to use "!important" as you want to override the style defined by Bootstrap. Here is an Example :-
<template>
<div>
<div class="card d-inline-flex" style="width: 40rem; height:7rem; ">
<div class="row background">
<div class="col a">
<div class="p-5 bg-info rounded-left ">Flex item 1</div>
</div>
<div class="col a">
<div class="p-5 bg-info rounded-0 ">Flex item 1</div>
</div>
<div class="col a">
<div class="p-5 bg-info rounded-right">Flex item 1</div>
</div>
</div>
</div>
</div>
</template>
<script></script>
<style>
.background {
background-color: #dcdcdc;
}
.d {
margin-left: 4px;
}
.a {
padding-left:0 !important!;
padding-right:0 !important!;
}
</style>
Here i used a custom class called a, just mess around with padding-left to get the space you need.
Hi I am new to selenium via VBA, so I am trying to automate a process by loging into a webpage navigate and get data extracted into the excel file.
From what I have researched, first i have call the dropdown by click and then select the option.
Below is my code
Sub Praise()
Dim bot As New WebDriver
bot.Start "chrome"
bot.Get "https://dashboard.stripe.com/login"
bot.FindElementById("email").SendKeys ActiveCell.Value
bot.FindElementById("password").SendKeys ActiveCell.Offset(0, 1).Value
bot.FindElementByTag("form").submit
Application.Wait (Now + TimeValue("0:00:8"))
Set myelement = bot.FindElementByClass("bs-Link", Raise:=False)
If myelement Is Nothing Then
Else
bot.FindElementByClass("bs-Link").Click
End If
bot.FindElementByClass("db-AccountSwitcher-chevron").Click ' to call dropdown
bot.FindElementByClass("Text-color--white Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline").Click ' Error occurs in this line
End Sub
Here is the code to call dropdown
<div class="db-AccountSwitcher-button Box-root Flex-flex Flex-alignItems--center">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-activeImage">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--dark Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--noWrap Text-display--inline">Masorini.com</span></div>
<div class="Box-root Margin-left--8">
<div class="db-AccountSwitcher-chevron"></div>
</div>
</div>
Here is the code of the dropdown list
<div class="ScrollableMenu SearchableList-items" id="searchable-list-results-47" role="listbox" style="max-height: 200px;">
<div aria-selected="false" role="option">
<div>
<div class="Box-root Box-background--white Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--default Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">Masorini.com</span></div>
</div>
</div>
</div>
<div aria-selected="false" role="option">
<div>
<div class="Box-root Box-background--white Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--default Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">Ariavoss</span></div>
</div>
</div>
</div>
<div aria-selected="false" role="option">
<div>
<div class="Box-root Box-background--white Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--default Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">Bikinimas</span></div>
</div>
</div>
</div>
<div aria-selected="false" role="option">
<div>
<div class="Box-root Box-background--white Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--default Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">Diva Noche</span></div>
</div>
</div>
</div>
<div aria-selected="true" role="option">
<div>
<div class="Box-root Box-background--blue Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgb(255, 255, 255);"><span class="Text-color--white Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">Bootyswim</span></div>
</div>
</div>
</div>
<div aria-selected="false" role="option">
<div>
<div class="Box-root Box-background--white Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--default Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">Zainno</span></div>
</div>
</div>
</div>
<div aria-selected="false" role="option">
<div>
<div class="Box-root Box-background--white Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--default Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">Actiwears</span></div>
</div>
</div>
</div>
<div aria-selected="false" role="option">
<div>
<div class="Box-root Box-background--white Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--default Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">Rockactive</span></div>
</div>
</div>
</div>
<div aria-selected="false" role="option">
<div>
<div class="Box-root Box-background--white Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--default Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">Cat Lovers</span></div>
</div>
</div>
</div>
<div aria-selected="false" role="option">
<div>
<div class="Box-root Box-background--white Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--default Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">Chicnuit</span></div>
</div>
</div>
</div>
<div aria-selected="false" role="option">
<div>
<div class="Box-root Box-background--white Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--default Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">Bootyswim</span></div>
</div>
</div>
</div>
<div aria-selected="false" role="option">
<div>
<div class="Box-root Box-background--white Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--default Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">Diva Noche</span></div>
</div>
</div>
</div>
<div aria-selected="false" role="option">
<div>
<div class="Box-root Box-background--white Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--default Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">Bikinimas</span></div>
</div>
</div>
</div>
<div aria-selected="false" role="option">
<div>
<div class="Box-root Box-background--white Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--default Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">EpicDevil.co</span></div>
</div>
</div>
</div>
<div aria-selected="false" role="option">
<div>
<div class="Box-root Box-background--white Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--default Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">probago.com</span></div>
</div>
</div>
</div>
<div aria-selected="false" role="option">
<div>
<div class="Box-root Box-background--white Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--default Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">Activepose</span></div>
</div>
</div>
</div>
<div aria-selected="false" role="option">
<div>
<div class="Box-root Box-background--white Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--default Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">SiaRose.com</span></div>
</div>
</div>
</div>
<div aria-selected="false" role="option">
<div>
<div class="Box-root Box-background--white Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--default Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">Sunvoss</span></div>
</div>
</div>
</div>
<div aria-selected="false" role="option">
<div>
<div class="Box-root Box-background--white Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--default Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">Mosselli</span></div>
</div>
</div>
</div>
<div aria-selected="false" role="option">
<div>
<div class="Box-root Box-background--white Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--default Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">Aroabikini</span></div>
</div>
</div>
</div>
<div aria-selected="false" role="option">
<div>
<div class="Box-root Box-background--white Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--default Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">Swimlemon</span></div>
</div>
</div>
</div>
<div aria-selected="false" role="option">
<div>
<div class="Box-root Box-background--white Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--default Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">milewatches</span></div>
</div>
</div>
</div>
<div aria-selected="false" role="option">
<div>
<div class="Box-root Box-background--white Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--fallback"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--default Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">stripe-northwrist#massiveshops.com</span></div>
</div>
</div>
</div>
<div aria-selected="false" role="option">
<div>
<div class="Box-root Box-background--white Padding-horizontal--8 Padding-vertical--4 Flex-flex Flex-alignItems--center" style="cursor: pointer; user-select: none;">
<div class="Box-root Margin-right--8">
<div class="db-AccountSwitcher-accountImage Box-root Box-background--white">
<div class="db-AccountSwitcher-accountImage--content db-AccountSwitcher-accountImage--newAccount"></div>
</div>
</div>
<div class="TruncatedText" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"><span class="Text-color--default Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap Text-display--inline">New account</span></div>
</div>
</div>
</div>
</div>
Here is the error code
I am not sure about the click part for this but you need to remove spaces from the class name to get rid of that error
bot.FindElementByCss(".Text-color--white.Text-fontSize--16.Text-fontWeight--medium.Text-lineHeight--24.Text-typeface--base.Text-wrap--wrap.Text-display--inline").Click
That targets Bootyswim
If click works then you should also be able to use:
bot.FindElementByXPath("//*[#role='option'][5]").Click
Then you change the [5] for your other options.
Try the xpath here and play with selecting your other options.
You don't actually click the drop down then select the value. You simply set the drop down field to the value you want it to be.
Here's my little code snippet that does this on a site I need to navigate.
Dim element As Selenium.WebElement
Set element = WaitForElement(byName, "Your element ID here")
element.AsSelect.SelectByText "The exact text that's in the drop down"
The first line calls the function below - I was running into timeout issues waiting for the website to finish loading, so I wrote that to be able to intelligently wait until the page loaded before giving up on not finding the element.
The second line explicitly sets the drop down to the value that I'm looking for - there's no clicking on the element and selecting.
Private Function WaitForElement(ByVal Method As FindElementBy, ByVal elementID As String) As Selenium.WebElement
Dim startTimer As Single
startTimer = Timer
Dim waitTime As Single
waitTime = this.Driver.Timeouts.ImplicitWait / 100
Dim webBit As Selenium.WebElement
On Error Resume Next 'it is possible that we'll go looking for the element before it's been returned to view, that's fine, we're waiting for it
While webBit Is Nothing And Timer < (startTimer + waitTime)
Select Case Method
Case byClass
Set webBit = this.Driver.FindElementByClass(elementID)
Case byCSS
Set webBit = this.Driver.FindElementByCss(elementID)
Case byID
Set webBit = this.Driver.FindElementById(elementID)
Case byLinkText
Set webBit = this.Driver.FindElementByLinkText(elementID)
Case byName
Set webBit = this.Driver.FindElementByName(elementID)
Case byPartialLinkText
Set webBit = this.Driver.FindElementByPartialLinkText(elementID)
Case byTag
Set webBit = this.Driver.FindElementByTag(elementID)
Case byXPath
Set webBit = this.Driver.FindElementByXPath(elementID)
End Select
Wend
On Error GoTo 0 'resume normal error handling
Set WaitForElement = webBit
End Function
I am using Firefox Quantum.
It's something different than Mozzila firefox. I can't use firebug now as it is not supporting.How can i verify that the i am on a different frame.
As currently i can't write on the popup message. Maybe it is on different frame.
Can anyone explain me with proper example.
The HTMLM of the code is:-
<div class="store_form">
<div class="row">
<div class="col s12 m12 marg-top">
<div class="row">
<div class="col s12 m6 store_band_contact">
</div>
<div class="col s12 m6 store_add_left">
</div>
</div>
</div>
<form id="form_contact" class="col s12 m12" novalidate="novalidate">
<div id="errorMsg"></div>
<!-- <div class="row">
<p class="col s12" style="font-size: 15px;" >
<strong id="buyer_company"></strong>
</p>
</div> -->
<!-- <div class="row">
<p class="col s12" id="">Subject: Request to remove my bid
</p>
</div> -->
<div class="row">
<div class="input-field col s12">
<span class="editFiledHeading">Request to remove my bid</span>
<!-- Contact Seller -->
<textarea name="comment" maxlength="20000" id="comment" class="ckeditor" placeholder="" style="visibility: hidden; display: none;"></textarea><div id="cke_comment" class="cke_1 cke cke_reset cke_chrome cke_editor_comment cke_ltr cke_browser_webkit" dir="ltr" lang="en" role="application" aria-labelledby="cke_comment_arialbl" style="width: 99.8%;"><span id="cke_comment_arialbl" class="cke_voice_label">Rich Text Editor, comment</span><div class="cke_inner cke_reset" role="presentation"><span id="cke_1_top" class="cke_top cke_reset_all" role="presentation" style="height: auto; user-select: none;"><span id="cke_12" class="cke_voice_label">Editor toolbars</span><span id="cke_1_toolbox" class="cke_toolbox" role="group" aria-labelledby="cke_12" onmousedown="return false;"></span></span><div id="cke_1_contents" class="cke_contents cke_reset" role="presentation" style="height: 200px;"><span id="cke_16" class="cke_voice_label">Press ALT 0 for help</span><iframe src="" frameborder="0" class="cke_wysiwyg_frame cke_reset" title="Rich Text Editor, comment" aria-describedby="cke_16" tabindex="0" allowtransparency="true" style="width: 439px; height: 100%;"></iframe></div></div></div>
<input type="hidden" name="bid" id="bid_id" value="1035">
</div>
</div>
<div class="row" style="margin-top: 10px;">
<div class="col s6">
<p style="margin: 5px 0 0;">
<input type="checkbox" name="is_copy" id="is_copy" value="1">
<label for="is_copy">Send me a copy</label>
</p>
</div>
<div class="col s6">
<span class="right remainingLimit" id="comment_label" data-length="2500">Remaining: 2500</span>
</div>
</div>
<div class="row">
<div class="col s12">
<p class="defaultP">
If you like to remove a bid you can do that by
sending the request to the seller. Please make
sure that you state the reason for doing this.
Obvious accidents by using the wrong value are
easy to justify.
Please note that it is up to the seller to accept
or decline your request!
</p>
</div>
</div>
<div class="row">
<div class="col s12 center" style="margin: 20px 0 15px;">
<button class="transParentBtnSmall">Submit</button>
</div>
</div>
</form>
</div>
</div>
I have an in img in boostrap and i want it to show in right and to show 4 objects in the left in two rows each one has two objects which is 4 columns from the grid
My HTML
<div class="row">
<div class="col-md-4 col-sm-6 col-xs-12 img-container">
<div class="product first wow zoomInDown "
data-wow-delay="0.3s" data-wow-duration="2s">
<img src="images/hiro1.jpg" width="600" alt="" class="img-responsive" >
<h6 class="text-center">it is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout</h6>
<p>Energy</p>
</div> <!-- end of product-->
</div> <!-- end of bootstrap columns-->
<div class="col-md-4 col-sm-6 col-xs-12 img-container">
<div class="product second wow zoomInDown "
data-wow-delay="0.3s" data-wow-duration="2s">
<img src="images/hiro2.jpg" width="600" alt="" class="img-responsive">
<h6 class="text-center">it is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout</h6>
<p>Phyto</p>
</div> <!-- end of product-->
</div> <!-- end of bootstrap columns-->
<div class="banner">
<img src="http://placehold.it/300x450">
</div>
<div class="clearfix"></div>
<div class="col-md-4 col-sm-6 col-xs-12 img-container">
<div class="product second wow zoomInDown "
data-wow-delay="0.3s" data-wow-duration="2s">
<img src="images/hiro2.jpg" width="600" alt="" class="img-responsive">
<h6 class="text-center">it is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout</h6>
<p>Phyto</p>
</div> <!-- end of product-->
</div> <!-- end of bootstrap columns-->
<div class="col-md-4 col-sm-6 col-xs-12 img-container">
<div class="product second wow zoomInDown "
data-wow-delay="0.3s" data-wow-duration="2s">
<img src="images/hiro2.jpg" width="600" alt="" class="img-responsive">
<h6 class="text-center">it is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout</h6>
<p>Phyto</p>
</div> <!-- end of product-->
</div> <!-- end of bootstrap columns-->
</div> <!-- end of row-->
MY CSS
.product{ overflow: hidden; margin-bottom: 40px; position: relative; cursor: pointer; float: left;}
.product p {position: absolute; top: 10%; left:200%; color: white;
z-index: 2000; font-size: 20px; opacity:0; transition:all 0.5s;}
.product h6 {position: absolute; top: 40%; left:-200%; color: white;
z-index: 3000; font-size: 20px; opacity:0; transition:all 0.5s ; line-height: 20px;
transition-timing-function: cubic-bezier(0.000, 0.000, 0.580, 1.000); }
and this is the result that shows up
http://i.imgur.com/2PhECdx.jpg
I have modified your code to make two columns and the first column is containing two rows with two columns.
<div class="row">
<div class="col-md-8 col-sm-6 col-xs-12">
<div class="row">
<div class="col-md-6 col-sm-6 col-xs-12 img-container">
</div>
<div class="col-md-6 col-sm-6 col-xs-12 img-container">
</div>
</div>
<div class="row">
<div class="col-md-6 col-sm-6 col-xs-12 img-container">
</div>
<div class="col-md-6 col-sm-6 col-xs-12 img-container">
</div>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12 img-container">
</div>
</div>
Check this:
http://jsfiddle.net/h68hzfnc/
I created a carousel using Twitter Bootstrap 3 and I cannot get it to work correctly. The slides seem to Overlay each other and it does not cycle through them all. Checked for coding errors but found none. Here is a Jsfiddle with my code: (http://jsfiddle.net/N6Y4D/)
Or here:
<div id="myCarousel" class="carousel slide">
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="item-active">
<img src="img/slide1.png" style="height: 100%; width: 100%; display: block"/>
<div class="container">
<div class="carousel-caption">
<h1>Heading text</h1>
<p>Description</p>
</div>
</div>
</div>
<div class="item">
<img src="img/slide2.png" style="height: 100%; width: 100%; display: block"/>
<div class="container">
<div class="carousel-caption">
<h1>Heading text</h1>
<p>Description</p>
</div>
</div>
</div>
<div class="item">
<img src="img/slide3.png" style="height: 100%; width: 100%; display: block"/>
<div class="container">
<div class="carousel-caption">
<h1>Heading text</h1>
<p>Description</p>
</div>
</div>
</div>
</div>
<a class="left carousel-control" href="#myCarousel" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>
<script src= "js/jquery-2.0.2.js"></script>
<script src= "js/bootstrap.js"></script>
</body>
Here is complete code for it.. Inside the 'carousel-inner' you have written as 'item-active' , it should be 'item active' Both are separate classes.
<div id="myCarousel" class="carousel slide">
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="item active"> // error was occurring here it should item active not item-active
<img src="img/slide1.png" style="height: 100%; width: 100%; display: block"/>
<div class="container">
<div class="carousel-caption">
<h1>Heading text</h1>
<p>Description</p>
</div>
</div>
</div>
<div class="item">
<img src="img/slide2.png" style="height: 100%; width: 100%; display: block"/>
<div class="container">
<div class="carousel-caption">
<h1>Heading text</h1>
<p>Description</p>
</div>
</div>
</div>
<div class="item">
<img src="img/slide3.png" style="height: 100%; width: 100%; display: block"/>
<div class="container">
<div class="carousel-caption">
<h1>Heading text</h1>
<p>Description</p>
</div>
</div>
</div>
</div>
<a class="left carousel-control" href="#myCarousel" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>